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: [Q] (newbie here) Guile as an extention language.


27-Jun-00 03:59 you wrote:
> 2) In the scheme implementation, it uses garbage collection, rather than
> refcounts.  This has some benefits - memory management is easier because
> you don't have to do it - but it can cause problems as well.  One problem
> is that you have to modify the programs "main" function.  This limits the
> number of programs you can really write bindings for.  For example, the
> Apache group wouldn't care if I wrote a mod_scheme module if it was using
> refcounts, but I think they would laugh out loud if I submitted an apache
> patch that ran gh_enter as void main() if mod_scheme was enabled.  This is
> true with many extensible programs - guile has to be built in to begin
> with, and cannot simply be a plugin.

In fact it's lie. What GC need is information about stack and data segment
placement. It's true that it's trivially obtained if main calling libguile and
then libguile calling "real" main. But it's NOT the only way. Boehm's GC
(http://reality.sgi.com/boehm/gc.html) need such info as well and it uses
some heuristics to work on some systems without such trick. Just "a few ones":
Linux i386 and Linux M68K, A/UX M68K and HP/UX, AIX RS6000 and Win32, etc.
In fact it work just fine without any main() tricks on all popular systems.
So this trick with main() is still unconditionally used in guile just since
(as we all know) "someone else" is a lazy bastard and can not develop scheme
to use Boehm's GC's gcconfig.h for guile's GC...




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