Skip to content

Commit 9f735fd

Browse files
JohanEngelendlang-bot
authored andcommitted
Fix alignment of buffers in kernighan_ritchie unittests.
1 parent 8e76f07 commit 9f735fd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

std/experimental/allocator/building_blocks/kernighan_ritchie.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -647,7 +647,7 @@ fronting the GC allocator.
647647
import std.experimental.allocator.gc_allocator : GCAllocator;
648648
import std.typecons : Ternary;
649649
// KRRegion fronting a general-purpose allocator
650-
ubyte[1024 * 128] buf;
650+
align(KRRegion!().alignment) ubyte[1024 * 128] buf;
651651
auto alloc = fallbackAllocator(KRRegion!()(buf), GCAllocator.instance);
652652
auto b = alloc.allocate(100);
653653
assert(b.length == 100);
@@ -916,7 +916,7 @@ version (StdUnittest)
916916
@system unittest
917917
{ import std.typecons : Ternary;
918918

919-
ubyte[1024] b;
919+
align(KRRegion!().alignment) ubyte[1024] b;
920920
auto alloc = KRRegion!()(b);
921921

922922
auto k = alloc.allocate(128);

0 commit comments

Comments
 (0)