[ODE] SIGSEGV in dSolveLCP() at ode/src/lcp.cpp:1137

DjArcas djarcas at hotmail.com
Thu Feb 12 12:12:13 MST 2004


My personal thoughts (coming from a console coder) is 'don't allocate memory
except at startup!'

If ODE needs 80 megs, fine, but it should allocate it's maximum amount of
memory at init, then simply use that pool. Unless there's some foible in ODE
that means it's better to work this way? Allocating memory has also always
been something I've labelled under 'slow', too...

----- Original Message ----- 
From: "Adam D. Moss" <adam at gimp.org>
To: "ode" <ODE at q12.org>
Sent: Thursday, February 12, 2004 11:56 AM
Subject: Re: [ODE] SIGSEGV in dSolveLCP() at ode/src/lcp.cpp:1137


> Olivier Michel wrote:
> > Well, it works fine now. I patched the lcp.cpp file as follow:
>
> Interesting, though I can't help feeling that this was
> still quite solvable from the app side.  Did you decrease your
> step size and/or use many microsteps when using StepFast?  How
> many?  Did no figure help?
>
> > #define ALLOCA(x) malloc(x)
> > #define FREEA(a) free(x)
>
> (#define FREEA(x) free(x) ?)
>
> > and I added a FREEA() for each ALLOCA() call in the source code. Now my
> > simulation never crashes (great!).
> > We could do the same for other files (step.cpp, matrix.cpp, etc.) and
> > set up some #ifdef stuff so that the user can compile ODE in stack
> > allocation of dynamic allocation mode.
> >
> > I volunteer to implement this patch if it will be integrated into the
> > main ODE CVS trunk.
> >
> > Let me know what do you think about it.
>
> I'm quite interested.  This is probably useful for non-realtime
> complex systems that insist on using StepSlow; it's also essential
> for any platforms that don't have alloca(), though I do suspect that
> the fairly massive heap churn could render it unpleasant in those
> situations.  What do other people think?
>
> --Adam
> -- 
> Adam D. Moss   . ,,^^   adam at gimp.org   http://www.foxbox.org/   co:3
> "At this point the rocket becomes engorged with astronauts."
> _______________________________________________
> ODE mailing list
> ODE at q12.org
> http://q12.org/mailman/listinfo/ode
>


More information about the ODE mailing list