mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-28 12:18:25 +00:00
When the ExpandableHeap calls the remove_memory function, the subheap is assumed to be removed and freed entirely. remove_memory may drop the underlying memory at any time, but it also may cause further allocation requests. Not removing it from the list before calling remove_memory could cause a memory allocation in that subheap while remove_memory is executing. which then causes issues once the underlying memory is actually freed.