Skip to content

Commit

Permalink
Fix alignment of buffers in kernighan_ritchie unittests.
Browse files Browse the repository at this point in the history
  • Loading branch information
JohanEngelen authored and dlang-bot committed Apr 1, 2024
1 parent 8e76f07 commit 9f735fd
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -647,7 +647,7 @@ fronting the GC allocator.
import std.experimental.allocator.gc_allocator : GCAllocator;
import std.typecons : Ternary;
// KRRegion fronting a general-purpose allocator
ubyte[1024 * 128] buf;
align(KRRegion!().alignment) ubyte[1024 * 128] buf;
auto alloc = fallbackAllocator(KRRegion!()(buf), GCAllocator.instance);
auto b = alloc.allocate(100);
assert(b.length == 100);
Expand Down Expand Up @@ -916,7 +916,7 @@ version (StdUnittest)
@system unittest
{ import std.typecons : Ternary;

ubyte[1024] b;
align(KRRegion!().alignment) ubyte[1024] b;
auto alloc = KRRegion!()(b);

auto k = alloc.allocate(128);
Expand Down

0 comments on commit 9f735fd

Please sign in to comment.