Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-10 Thread Kristian Lein-Mathisen
Hi Daniel, Sorry for the late reply, I'm on vacation. Q1: no, you are not calling back into Scheme (you'd need define-external or something). Q2: What it seems you are doing there is construct a compound object using the Chicken C-api. I try to avoid doing that. Constructing Scheme objects in

Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-07 Thread felix . winkelmann
> 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 >

Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-07 Thread Kristian Lein-Mathisen
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,

Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-07 Thread Daniel Ortmann
I have Scheme calling the C yylex() and can easily get all of the token ints. I am trying to return '(tok,lineno) '(tok,lineno,intval) or '(tok,lineno,strval)     C_word *ptr, *sptr;     C_word lst; ...     case TOK_G_R_SECT:     printf("gettoken:(TOK_G_R_SECT,line,text) =

Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-07 Thread Dan Leslie
Isn't it possible to pin items, and avoid these relocation and garbage collection issues, with object-evict? https://wiki.call-cc.org/eggref/5/object-evict -Dan Sent with [ProtonMail](https://protonmail.com) Secure Email. ‐‐‐ Original Message ‐‐‐ On Wednesday, August 7, 2019 1:00 PM,

Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-07 Thread Kristian Lein-Mathisen
Hi Daniel and welcome to the Chicken mailing list. Another thing to keep in mind is that the Chicken garbage-collector will move objects around during gc. That can cause a lot of hard-to-find bugs, and is probably one of the reasons for Joerg advice on not calling back into Scheme from your

Re: [Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-06 Thread Jörg F. Wittenberger
Hello Daniel, welcome here. Since CHICKEN compiles into C, all the tools you are used with C to use are still there. Personally I'm not a fan of fancy debuggers, since most of the things I write tend to depend on external (network) events. I'd welcome tips how to automate those jobs using

[Chicken-users] memory monitoring and leak debugging? (should the advice be in a web page?)

2019-08-06 Thread Daniel Ortmann
Hello all, I am new to Chicken Scheme and experimenting with binding scheme to a C scanner built with Flex.  The results are fast but I feel the need to monitor memory use and watch for leaks. The only relevant thing I find on call-cc.org is this url: