--- Marc Kleine-Budde <[EMAIL PROTECTED]> wrote: > On Mon, Mar 31, 2003 at 08:29:43AM -0800, Dalibor > Topic wrote: > > Hi Marc, > > > > --- Marc Kleine-Budde <[EMAIL PROTECTED]> wrote: > > > > > > My assumption is that KFREE clears the mem at > once, > > > and gc_free marks > > > the mem to be freed by the garbage collector? > Am I > > > right? > > > > AFAIK, KMALLOC/KFREE should be used for memory > that > > does not go through the gc, while > gc_malloc/gc_free > > should be used for the rest. Never mix the calls, > or > > you'll be in big trouble. KMALLOC/KFREE leave > memory > > management to the runtime library, while > > gc_malloc/gc_free do their own memory management. > > Okay. Remeber never mix gc_* and K* calls. But if > you have a look at the > CVS-sources $KAFFE/libraries/clib/native/ZipFile.c > lines 26-36. The mem > for the str is alloced via KMALLOC, but later freed > with gc_free. It > this a bug?
Yeah, I think so. I've attached a patch to fix it, (and a similar case below). could you give it a try, and see if it breaks anything? cheers, dalibor topic __________________________________________________ Do you Yahoo!? Yahoo! Tax Center - File online, calculators, forms, and more http://tax.yahoo.com
zip-file.patch
Description: zip-file.patch
