chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] clueless about memory consumtion


From: F. Wittenberger
Subject: [Chicken-users] clueless about memory consumtion
Date: Mon, 05 Jul 2010 21:09:44 +0200

Hi,

I'm surprised about the memory consumption pattern my chicken program
exhibits after some hours running.  Though I'd like to get a hand on
exploration, since I have no idea how to boil it down to a test case.

As it appears from more or less regular watching "top" I see the process
as if was growing once open a time for a while in steps of 2M per second
an then rest a long time.  There is no apparent correlation with
external activities.  But this is kind of analysis not only tedious...

Some chicken debug features might be taboo: anything, which will write
to (current-output-port) during GC, since this has been cluttering my
files before (e.g., usage of "print" from chicken's library.scm when
running finalizers).  (Besides this memory statistics being too complex
for my brain to digest.)

I already ruled out nearby possibilities:
- no malloc(2)/free(2) (including gc-root handling) mismatch in my code
- no callbacks to Scheme from C

+ There is probably no pure algorithmic error; the "same" program
(except for the compatibility layer) runs in rscheme with quite a
different consumption pattern.  (It starts out with about 2 times a much
memory, grows within the first hour to 4 times the initial amount and
stays there almost constant - whereby the difference has a change to be
attributed to some string->symbol usage.)  But since I can't completely
rule that out...

So the questions:

- how could I find out, how much memory chicken thinks it has allocated?
- how could I hook into the memory allocation process to signal back to
chicken for logging or other actions?
- how could I plot/walk the allocated memory to find out which objects
are there and why?

ANY ideas welcome!  As I said in the subject line: I'm really clueless
how do track this down.

Thanks a lot

/Jerry



reply via email to

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