This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


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

Re: Gen GC?


mlivshin@bigfoot.com writes:
> > My smob free() routines lie, but so do my alloc routines: I don't use
> > scm_must_malloc (), but use the C++ new operator, and return 0 from
> > smob_free().
> > 
> > I lie because some of the smobs are base classes, and one can not tell
> > the real class of an object from within the constructor.  Would it
> > help if I lie a little less about the sizes?
> 
> yes, it would -- GC is triggered on the malloc'ed amount too.
> 
> if you use C++'s new operator and not scm_must_malloc, then you can
> use the scm_done_malloc(size) to report the size, and then return this
> size from smob_free().

Where is the corresponding scm_done_free ()? Sometimes I need to take
over memory management of an object from GUILE.

> P.S.  did you have any luck with libtool?

Haven't looked yet.

-- 

Han-Wen Nienhuys, hanwen@cs.uu.nl ** GNU LilyPond - The Music Typesetter 
      http://www.cs.uu.nl/people/hanwen/lilypond/index.html 


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