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: Calling Scheme from C and Garbage Collection






>Chris.Bitmead@misys.com.au writes:
>
>> I don't think it's too slow if you just want to do unit testing of a
number
>>  of
>> new functions, satisfy yourself, and then switch it off again.
>
>Why don't you try it?  Add an unconditional call to gc to SCM_NEWCELL,
compile, and >fire it up.

Ideally, you would turn it on in your scheme test harnass just prior to
calling the C functions you want to call, to avoid the startup overhead.
The overhead would be the time taken to do a full gc multiplied by the
number of objects allocated by the C function being tested in your test
harnass.