[kaffe] gc_free vs. KFREE
robilad at yahoo.com
Wed Apr 2 06:04:02 PST 2003
--- Marc Kleine-Budde <kleine-budde at gmx.de> wrote:
> On Mon, Mar 31, 2003 at 08:29:43AM -0800, Dalibor
> Topic wrote:
> > Hi Marc,
> > --- Marc Kleine-Budde <kleine-budde at gmx.de> wrote:
> > >
> > > My assumption is that KFREE clears the mem at
> > > and gc_free marks
> > > the mem to be freed by the garbage collector?
> Am I
> > > right?
> > AFAIK, KMALLOC/KFREE should be used for memory
> > does not go through the gc, while
> > should be used for the rest. Never mix the calls,
> > you'll be in big trouble. KMALLOC/KFREE leave
> > 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?
Do you Yahoo!?
Yahoo! Tax Center - File online, calculators, forms, and more
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 681 bytes
Url : http://kaffe.org/pipermail/kaffe/attachments/20030402/089aff1c/attachment-0003.obj
More information about the kaffe