On Thu, 13 Nov 2003, Norman Tuttle wrote: > How do the pools define "if possible" in your wording below (i.e., how > would the pool know when to reuse memory)?
It's kind of complicated, so I don't know how well I can explain it off the top of my head (Sander, feel free to jump in here :), but it keeps freelist buckets of varying power-of-two sizes, and if it finds one of the appropriate size, it will use it. But there are two levels of things going on, too, because the allocator hands out blocks of a certain size, which the pools then divide up into smaller blocks... Oy. Sander? Help me out. :)