This is the mail archive of the guile@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: FAQ FOOD! Re: scm_must_malloc and memory leaking?


Miroslav Silovic <silovic@zesoi.fer.hr> writes:

> Greg Harvey <Greg.Harvey@thezone.net> writes:
> 
> > This looks much more like the leak detector is not understanding the
> > gc than actual memory leaks. For the most part, they're of dubious
> > value if you're doing anything besides straight malloc/free things. 
> 
> Probably corrent. SCM, when serving as a pointer, is xored by
> something. Since most memory detectors work like conservative GC, they
> miss /all/ the guile pointers.

No, not at all. A SCM is either an immediate or a pointer into the
heap. They have to occasionally be messed with slightly on machines
where a pointer isn't just a linear address, but for the most part,
they're just pointers (albeit stored in longs, which could be causing
part of the confusion). The only place a leak detector should be
trusted to make a decent judgement about guile is where mallocs/frees
are taking place without becoming parts of scheme objects, and since
this is fairly rare, it's probably easier to do this by hand than to
have to wade through a lot of false alarms.

-- 
Greg

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