Skip to content

Commit

Permalink
Alter layout again.
Browse files Browse the repository at this point in the history
  • Loading branch information
mjp41 committed Feb 24, 2025
1 parent f2faf98 commit 5261809
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/snmalloc/mem/corealloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -1439,11 +1439,11 @@ namespace snmalloc
Config::Pal::error("Failed to initialise thread local allocator.");
}

capptr::Alloc<void> spare_start = pointer_offset(raw, round_sizeof);
Range<capptr::bounds::Alloc> r{spare_start, spare};
capptr::Alloc<void> alloc_start = pointer_offset(raw, round_sizeof);
Range<capptr::bounds::Alloc> r{raw, spare};

auto p = capptr::Alloc<CA>::unsafe_from(
new (raw.unsafe_ptr(), placement_token) CA(r));
new (alloc_start.unsafe_ptr(), placement_token) CA(r));

// Remove excess from the bounds.
p = Aal::capptr_bound<CA, capptr::bounds::Alloc>(p, round_sizeof);
Expand Down

0 comments on commit 5261809

Please sign in to comment.