Confirm alignment when calculating an offset to split at
This commit is contained in:
parent
35b7194fb7
commit
ff952fa2e4
@ -85,6 +85,9 @@ static usize get_fair_offset_to_split_at(HeapBlock* block, usize min)
|
||||
available -= (available /
|
||||
2); // reserve half of the rest for the new block, while still leaving another half for the old one.
|
||||
|
||||
check(is_aligned(available,
|
||||
16UL)); // If necessary, we can just align it. This is more of a sanity check than a requirement.
|
||||
|
||||
return available + block->req_size;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user