We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8e76f07 commit 9f735fdCopy full SHA for 9f735fd
1 file changed
std/experimental/allocator/building_blocks/kernighan_ritchie.d
@@ -647,7 +647,7 @@ fronting the GC allocator.
647
import std.experimental.allocator.gc_allocator : GCAllocator;
648
import std.typecons : Ternary;
649
// KRRegion fronting a general-purpose allocator
650
- ubyte[1024 * 128] buf;
+ align(KRRegion!().alignment) ubyte[1024 * 128] buf;
651
auto alloc = fallbackAllocator(KRRegion!()(buf), GCAllocator.instance);
652
auto b = alloc.allocate(100);
653
assert(b.length == 100);
@@ -916,7 +916,7 @@ version (StdUnittest)
916
@system unittest
917
{ import std.typecons : Ternary;
918
919
- ubyte[1024] b;
+ align(KRRegion!().alignment) ubyte[1024] b;
920
auto alloc = KRRegion!()(b);
921
922
auto k = alloc.allocate(128);
0 commit comments