Discussion:
prescheme & boehm leak detection?
Raoul Duke
2014-08-12 04:50:05 UTC
Permalink
http://hboehm.info/gc/leak.html

so prescheme doesn't use a gc, but i am wondering... does it use
malloc/free such that i could easily patch it to use boehm gc in the
leak detection mode?

i have downloaded the sources and am looking at them but remain
stunningly clueless so far...
Raoul Duke
2014-08-12 04:50:54 UTC
Permalink
and/or even use boehm as a real gc?
Michael Sperber
2014-08-12 07:11:03 UTC
Permalink
Post by Raoul Duke
http://hboehm.info/gc/leak.html
so prescheme doesn't use a gc, but i am wondering... does it use
malloc/free such that i could easily patch it to use boehm gc in the
leak detection mode?
i have downloaded the sources and am looking at them but remain
stunningly clueless so far...
I'm not aware that anyone has tried, but I don't see why it wouldn't
work. (Unless you use funky address arithmetic like the VM, of course.)
Also, I don't see why plugging in the Boehm GC shouldn't work.
--
Regards,
Mike
Richard Kelsey
2014-08-12 11:50:54 UTC
Permalink
Post by Michael Sperber
Post by Raoul Duke
http://hboehm.info/gc/leak.html
so prescheme doesn't use a gc, but i am wondering... does it use
malloc/free such that i could easily patch it to use boehm gc in the
leak detection mode?
i have downloaded the sources and am looking at them but remain
stunningly clueless so far...
I'm not aware that anyone has tried, but I don't see why it wouldn't
work. (Unless you use funky address arithmetic like the VM, of course.)
Also, I don't see why plugging in the Boehm GC shouldn't work.
Just to be clear, compiled PreScheme programs do use malloc() and free().
If you look at prescheme/test/write.scm, 'allocate-memory' and
'deallocate-memory' compile to calls to malloc() and free(). As Mike says,
it should work fine with Boehm's GC as long as your program doesn't itself
do anything odd with pointers.

-Richard

Loading...