Fix off-by-one error in `DroplessArena::alloc_raw`.
This causes unnecessary calls to `grow` when the allocation would fit exactly in the remaining space.
This commit is contained in:
parent
bc10b68e79
commit
5ceff6b96a
|
@ -386,7 +386,7 @@ impl DroplessArena {
|
|||
self.align(align);
|
||||
|
||||
let future_end = intrinsics::arith_offset(self.ptr.get(), bytes as isize);
|
||||
if (future_end as *mut u8) >= self.end.get() {
|
||||
if (future_end as *mut u8) > self.end.get() {
|
||||
self.grow(bytes);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue