[plt-scheme] Incremental GC
On Tuesday, June 17, 2003, at 03:37 PM, Matthew Flatt wrote:
> At Tue, 17 Jun 2003 12:42:33 -0400, Brian Campbell wrote:
>> I'm using PLT Scheme embedded in a multimedia application, and garbage
>> collection is sometimes an issue. I've noticed that the Boehm GC
>> supports incremental garbage collection, but I don't know how well
>> that
>> would work with PLT Scheme. Would turning incremental garbage
>> collection on be possible in PLT Scheme's version of Boehm? How would
>> I
>> go about doing that?
>
> As far as I know, there's no particular reason that it won't work.
>
> To enable incremental collection, insert a call to
> GC_enable_incremental() somewhere at the beginning of the program.
>
> I tired inserting such a call into main() for MzScheme under Linux. It
> didn't crash when running MzScheme's test suite, and the sum of GC
> pauses was cut in half, while the total run time went up about 15%
> (consistent with incremental collection).
That doesn't seem to work for me on Windows (in our application, I
haven't tried plain old MzScheme). It crashes with a memory access
violation somewhere in the initialization of the scheme environment.
While it's interning a symbol, it tries to do a write to memory that
has just a line or two before been allocated, and gets an access
violation error. The Boehm documentation says that support for
incremental GC on Windows is not very good, so maybe this might just
not work. Does anyone have any ideas for what else I could try? Should
I just bring this up on the Boehm mailing list?
> Matthew
>