[ODE] alloc vs. malloc again

Nate W coding at natew.com
Fri Jun 21 10:00:02 2002


On Fri, 21 Jun 2002, Adam Moravanszky wrote:

> > memory manager treats the pool like a stack.  In other words, have the
> > assumption that allocations and frees will be invoked in stack order like
> > push and pop operations.
> 
> Such a manager is absolutely trivial to write: just an array of objects with
> a 'last' pointer, you can even use an STL vector -- no need to look for 3rd
> party code. 

That's a good point.  Given that all objects are the same size, the
problem gets even easier... I hadn't thought of that.

-- 

Nate Waddoups
Redmond WA USA
http://www.natew.com