[ODE] Problem in dReal *L = (dReal*) ALLOCA (740216);
Olivier Michel
Olivier.Michel at cyberbotics.com
Mon Jul 26 14:45:06 MST 2004
Hi,
I fixed this problem a while ago with a patch which was not yet applied
to the CVS. It allows you to compile ODE with a fast dynamic memory
allocation instead of stack allocation (ALLOCA doesn't allocate memory
on the stack any more, but from the system memory).
The patch is available for download at:
http://cyberboticspc1.epfl.ch/ftp/ode_dynamic_memory.tar.bz2 (49k)
It would help if someone with CVS write privileges could commit it. Some
improvements on this patch have been discussed on this list. This would
allow us to progress on this issue. It is not a dangerous patch since
the default built of ODE remains unchanged.
Thanks!
-Olivier
Liu wrote:
> ALLOCA is a convenient function. It can free stack space by itself.
>
> But
>
> If enough stack space is available, alloca returns a pointer to the
> allocated stack area. Otherwise, it returns NULL.
>
> When I handle the complex collide problem. In the
> void dSolveLCP (int n, dReal *A, dReal *x, dReal *b, dReal *w, int
> nub, dReal *lo, dReal *hi, int *findex)
> {
> ...
> dReal *L = (dReal*) ALLOCA (n*nskip*sizeof(dReal));
> dReal *d = (dReal*) ALLOCA (n*sizeof(dReal));
> dReal *delta_x = (dReal*) ALLOCA (n*sizeof(dReal));
> ...
> }
> The max stack space is 740216, but *L usually more over. What can I do
> ? thanks a lot.
>
>
>------------------------------------------------------------------------
>
>_______________________________________________
>ODE mailing list
>ODE at q12.org
>http://q12.org/mailman/listinfo/ode
>
>
More information about the ODE
mailing list