alloca and native code
Andrew Haley
aph@redhat.com
Tue Sep 12 07:22:00 GMT 2000
Tom Tromey writes:
> >>>>> "Oskar" == Oskar Liljeblad <osk@hem.passagen.se> writes:
>
> Oskar> Is it ok to use alloca from native code?
>
> Yes. We use it sometimes in libjava. Even more frequently we use
> variable-sized arrays, since they are less of a hassle -- no need to
> test for and conditionally include <alloca.h>.
It would be nice if we didn't do this in embedded systems, since it
breaks the nice property that Java aprograms have small stacks, and
the stack is only scanned conservatively. We ought to question if
this is a performance win on any system.
Andrew.
More information about the Java
mailing list