[ODE] SIGSEGV in dSolveLCP() at ode/src/lcp.cpp:1137
Adam D. Moss
adam at gimp.org
Fri Feb 13 11:54:05 MST 2004
Michael Lacher wrote:
> The main memory problem seems to be the LCP solver in ODE. Are these
> allocations even in a stack ?
Yes and no... alloca / ALLOCA / dALLOCA16 are used all over
ODE -- I guess the priority is to wrap just the solver (I'd
hate, in retrospect, to have to de-alloca-ize the whole of ODE),
which I don't think uses recursion although it certainly uses
a pretty large (and variable) number of (variable-sized) nested
temporary allocations.
[..]
> Because in the latter case one could just skip the whole allocation part
> totally and provide a constant, fixed memory block to be used by the LCP
> solver which is resused without allocation stuff going on.
The fixed block would still have to be apportioned to those who
want it -- the 'solving' process is a noodle soup of little
subsolvers who all (justifiably) really dig ALLOCA. Really you're
probably going to struggle to come up with a more attractive and
fast paradigm (alloca() just comes down to moving the stack pointer,
and cleanup is both implicit and 'free') -- alloca() rocks, but it's
also not really a standard and it's simply dangerous (no easy
accounting and no reliable failure mode) when you might
potentially want to allocate a LOT of data, which many uses
of ODE do.
--Adam
--
Adam D. Moss . ,,^^ adam at gimp.org http://www.foxbox.org/ co:3
"At this point the rocket becomes engorged with astronauts."
More information about the ODE
mailing list