[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Best way to share memory between C and Chicken
From: |
Felix |
Subject: |
Re: [Chicken-users] Best way to share memory between C and Chicken |
Date: |
Sun, 05 May 2013 13:54:38 +0200 (CEST) |
From: Thomas Chust <address@hidden>
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] Best way to share memory between C and Chicken, Pedro Melendez, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Dan Leslie, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Thomas Chust, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Ivan Raikov, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Dan Leslie, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Ivan Raikov, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Dan Leslie, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Ivan Raikov, 2013/05/03
- Re: [Chicken-users] Best way to share memory between C and Chicken, Jörg F . Wittenberger, 2013/05/04
- Re: [Chicken-users] Best way to share memory between C and Chicken, Dan Leslie, 2013/05/04
- Re: [Chicken-users] Best way to share memory between C and Chicken, Ivan Raikov, 2013/05/05
- Re: [Chicken-users] Best way to share memory between C and Chicken, Felix, 2013/05/06
- Re: [Chicken-users] Best way to share memory between C and Chicken, John Cowan, 2013/05/06