From: Thomas Chust <[email protected]>
Subject: Re: [Chicken-users] Best way to share memory between C and Chicken
Date: Sat, 04 May 2013 00:57:25 +0200

> On 2013-05-04 00:26, Ivan Raikov wrote:
>> [...]
>> I really strongly advise _against_ using SRFI-4 vectors for 4G files,
>> as I have experienced serious performance issues even with vectors of a
>> few million elements.
>> [...]
> 
> Hello,
> 
> would that be related to the fact that CHICKEN has a copying garbage
> collector or are there other hidden performance implications of SRFI-4
> vectors?

SRFI-4 vectors live in the normal, heap that is subject to garbage
collection, so, yes - they are always copied completely on every major
collection (and the first minor GC during the lifetime of the SRFI-4
vector object). 

But note that the SRFI-4 constructors accept an optional argument
which specifies that the vector should be allocated in static,
non-GC'd memory.  In that case the storage has to be reclaimed
explicitly (using "release-number-vector", which is, funnily enough,
not documented - well, it is now) or by giving yet another optional
argument to use a finalizer for de-allocation.


cheers,
felix


_______________________________________________
Chicken-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to