This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: alloca and native code


Jeff Sturm writes:
 > 
 > > I want to allocate a piece
 > > of memory which isn't scanned or collected by the GC, which is freed
 > > when the (native implementation of the) method returns.
 > 
 > Memory reserved with alloca() _will_ be scanned by boehm-gc, like the rest of
 > the stack.  To avoid that, you could allocate memory with _Jv_AllocBytes
 > instead.

Yeah.  We use alloca() in a couple of places that we should purge.  I
have done this myself.  :-(

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]