[ODE] Re: ODE stack usage

Pete Baron sibaroni at hotmail.com
Mon Sep 6 21:51:16 MST 2004


Hi Dominic,

I believe that the stack useage is so extreme because the LCP solver is
recursive (although I could be wrong about that, I haven't investigated in
depth).  Certainly I have noticed that the stack usage increases very
steeply with the number of contacts and so large systems will tend to use a
*LOT*.  Personally I set the stack size to be 2MB and have not seen the
system crash with lack of stack space even when using systems with very
large numbers of individual collision objects
(http://home.btconnect.com/pete/archive1.html).
If you are working in a severely limited memory environment then you may
wish to replace many or all of the memory allocation statements with calls
to your own memory manager... in this way you could allocate memory more
efficiently at the cost of processor efficiency (ie. write a memory
allocater which uses 'best fit' for each memory request).

Hope this helps,

Pete Baron
sibaroni at hotmail.com

http://home.btconnect.com/pete/homepage.html



Date: Mon, 6 Sep 2004 17:38:48 +0100
From: "Dominic Jackson" <dominic.jackson at kuju.com>
Subject: [ODE] ODE stack usage
To: <ode at q12.org>
Message-ID:
<6466DCEA91144849937A75E6DB38698263A7EC at lon-exsvr.kuju.com>
Content-Type: text/plain; charset="us-ascii"



I am currently experimenting with ODE and am continually running out of
stack space (I assume this is due to the large number of alloca calls).

Can anyone help me with this as I need to put strict controls on memory
usage, or has anyone come across similar issues that they have found
ways to resolve ?

Apologies for being a bit vague on this, but any information will be
useful



Regards



Dominic Jackson


More information about the ODE mailing list