[ODE] About "malloc" patch
Simon Barratt
Barog at pineapple-interactive.com
Mon Oct 4 21:26:06 MST 2004
Using that method you can also erase any need for dSetZero's which seem
to still be around, when you have used the ram at the end of Step you
can just free the amount you used in that Step call.
Of course ideally the dSetZeros all get elisminated but it's a solution
which fixes the memory system and the dSetZero slowdowns.
--
Simon Barratt, Lead Developer, Pineapple Interactive Ltd
e: barog at pineapple-interactive.com
w: www.pineapple-interactive.com
t: +44 (0)1274 480185
-----Original Message-----
From: ode-bounces at q12.org [mailto:ode-bounces at q12.org] On Behalf Of Jon
Watte
Sent: Monday, October 04, 2004 5:15 PM
To: Anton Savin; ode at q12.org
Subject: RE: [ODE] About "malloc" patch
> Shortly, why not use smart pointers?
I suggested more or less the same thing, and even provided an
implementation on the list (not integrated to the ODE source), but the
original submitter preferred his own method.
In my opinion, the best allocator to use would not need UNALLOC at all;
instead, it would linearly allocate from a large block of memory, and
re-set at the top of each Step() function. When the large block (that's
pre-allocated) is not large enough, then a new block can be allocated
and added to the list of allocatable memory. An implementation much like
that was also posted to the list if you look in the archives (again, not
integrated into the ODE source).
Cheers,
/ h+
_______________________________________________
ODE mailing list
ODE at q12.org
http://q12.org/mailman/listinfo/ode
More information about the ODE
mailing list