alloca and native code
Tom Tromey
tromey@cygnus.com
Tue Sep 12 08:18:00 GMT 2000
>>>>> "Andrew" == Andrew Haley <aph@redhat.com> writes:
Andrew> It would be nice if we didn't do this in embedded systems,
Andrew> since it breaks the nice property that Java aprograms have
Andrew> small stacks, and the stack is only scanned conservatively.
Andrew> We ought to question if this is a performance win on any
Andrew> system.
I usually do it because it is more convenient than doing an explicit
alloc/free of unscanned memory (eg using _Jv_Malloc). In general I
only use alloca or a variable array if the size is bounded (though
that probably isn't always true, sigh). But I agree that revisiting
this makes sense. Maybe we should enter a PR, or even make it part of
our "coding standard (if we had one)".
Tom
More information about the Java
mailing list