Closed RinChanNOWWW closed 11 months ago
I don't believe this is a leak:
dealloc
method is generally a no-op, since bump allocators don't support general deallocation.bumpalo
only has a special case for LIFO deallocation within the current chunk, not across chunks.ptr..ptr.add(layout.size())
is within the current chunk.dealloc_chunk_list
deallocates whole chunks at a time.ptr..ptr.add(layout.size())
.Thank you. I misunderstood the implementation.
Setting
self.current_chunk_footer
directly will lose the control of the memory inptr..ptr.add(layout.size())
.When calling
dealloc_chunk_list
indrop
, we cannot find the memory betweenptr..ptr.add(layout.size())
.