[ODE] alloc vs. malloc again
Martin C. Martin
martin at metahuman.org
Thu Jun 20 19:49:02 2002
jon klein wrote:
>
> Obviously allocating on the stack has a large speed advantage
> over malloc/free, but for people who are more concerned about
> stability and runtime scalability, I think that malloc/free
> would do the trick.
>
> Another solution, which would fix the speed issue, would be to
> have static pointers to buffers which grow when necessary and
> don't get freed at all until the program terminates. This would
> be even faster than allocating memory on the stack, but is
> considerably more work.
Actually, a good memory manager should do something like this for you,
behind the scenes.
> Is there anybody else who would like to see either of these
> options available (via a #define statement)?
I certainly would.
- Martin