scsh-users
[Top] [All Lists]

Re: [Q] C-interface and multiple return values

To: scsh@martigny.ai.mit.edu
Subject: Re: [Q] C-interface and multiple return values
From: sperber@informatik.uni-tuebingen.de (Michael Sperber [Mr. Preprocessor])
Date: 09 Aug 1996 12:53:09 +0200
Organization: Wilhelm-Schickard-Institut, Kakerlakenzuchtverein
>>>>> "HS" == schaffer  <schaffer@wat.hookup.net> writes:

HS> In <4u5igd$d0a@wobbegong.cs.indiana.edu>, jeschke@cs.indiana.edu (Eric 
Jeschke) writes:
>> ...
>> Is this because Scheme-48 needs to keep track of pointers for garbage
>> collection?  Would this be solved by a conservative collector or is there
>> some other interesting reason?

HS> Typically, the scheme kernel contains functions to allocate the various data
HS> types in the scheme heap (how else do you think it's done in scheme.  It's
HS> only a question of making this function accessible (include def in the .h
HS> file and provide some documentation).

It's not that simple in Scheme 48, since the "kernel" is written in
PreScheme, and the resulting C code doesn't contain accessible entry
points for this stuff.  The upcoming 0.44 version is better in that
respect, but some work still needs to be done to make the GC interface
sufficiently abstract.

It's not enough to allocate the data structure, you also have to
provide a way to track the pointer information to and within an
allocated object.  Even something like the Boehm collector, you'd have
to provide a way to access the internal pointer representation of
Scheme 48.

Simply swapping the collector is therefore not quite so easy.  The
biggest obstacle is actually providing code that saves and reads
images---the present code relies on the fact that the heap is
contiguous after a GC.  So you'd have to essentially rewrite that,
too.

Cheers =8-} Mike



<Prev in Thread] Current Thread [Next in Thread>