As of 4da32e846cc0638f5a8220b06ae283269d793c90, there's a very weird bug in the heap allocator.
In buddy::test::test_alloc_and_dealloc(), when we deallocate all the 8mB blocks and then the 32mB block, the next allocation is correct. But if we deallocate the 32mB block before we've deallocated all of the 8mB blocks, the next allocation doesn't match the pointer given to us by mem.offset().
As of 4da32e846cc0638f5a8220b06ae283269d793c90, there's a very weird bug in the heap allocator.
In
buddy::test::test_alloc_and_dealloc()
, when we deallocate all the 8mB blocks and then the 32mB block, the next allocation is correct. But if we deallocate the 32mB block before we've deallocated all of the 8mB blocks, the next allocation doesn't match the pointer given to us bymem.offset()
.This works:
But this doesn't: