chicken-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] memory monitoring and leak debugging? (should the ad


From: felix . winkelmann
Subject: Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)
Date: Thu, 08 Aug 2019 00:33:07 +0200

> That is possible, but it is quite hard to use correctly in my opinion. It's
> also not in core anymore. If I understand things correctly, there is a
> performance penalty in every new gc root. Maybe some of the core team
> members can comment. To me, object-evict has been a last-resort (and as
> such, I've never used it) but I don't know how others might feel about it.
>

"object-evict" moves an object into statically allocated memory, it does
not create a GC root. There are issues with object-identity for symbols
and also the eviction recurses into all data contained in the object. It
is most useful for number arrays and data that contains only numeric
or simple values.

But Kristian is quite right - it's a low-level tool for very specific
situations. Using "foreign-lambda*" with callbacks into Scheme
is a cleaner way of handling allocation inside foreign code.


felix




reply via email to

[Prev in Thread] Current Thread [Next in Thread]