On 2/2/12 12:44 AM, H. S. Teoh wrote:
Out of curiosity, is there a way to optimize for the "many small allocations" case? E.g., if a function allocates, as temporary storage, a tree with a large number of nodes, which becomes garbage when it returns. Perhaps a way to sweep the entire space used by the tree in one go?
The easiest way would be to use a specialized allocator for this – I'm thinking of David Simcha's proposed RegionAllocator (formerly TempAlloc).
David