-
Notifications
You must be signed in to change notification settings - Fork 160
Open
Description
I think there's a memory leak in the Arena code.
Consider a scenario where:
* You create and release 3 arenas, each with a chunk of say 20KB of memory.
* You create a new arena, using one of those chunks; there are 2 chunks
left on the free list.
* You attempt to allocate a chunk of size 100KB.
If I read the code correctly, the loop in Arena_alloc() - p94 of the third
printing - invokes <get a new chunk 95>. Each time that is called, it
removes a chunk from the freelist, finds that it is not big enough, and
discards it, rather than restoring it to the freelist or releasing it.
--
Jonathan Leffler <jonathan.leffler@gmail.com>
Original issue reported on code.google.com by drhan...@gmail.com on 29 Sep 2008 at 7:50