[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-users] Memory Leaks with foreign libraries
From: |
felix winkelmann |
Subject: |
Re: [Chicken-users] Memory Leaks with foreign libraries |
Date: |
Fri, 3 Feb 2006 08:20:53 +0100 |
On 2/3/06, Matthew David Parker <address@hidden> wrote:
>
> Well, I looked at my game some more, and at the memory that csi is using,
> and it looks like if I move my ship all around the map it will allocate
> everything there is to allocate, and then it doesn't use up any more
> memory. Still, though, it never seems to free up any memory, so any new
> things just build up.
Hm...
>
> If I just go into csi and I (define jim "some really long string....")
> then it jumps up 100 bytes of memory usage. Then if I (set! jim "") it
> doesn't go back down. Shouldn't it go back to almost where it was?
Perhaps after you do a '(gc)' ? Since chicken does it's own memory
management, and gc is only done after a certain amount of
garbage has accumulated, that release of storage may be delayed.
Also, the heap may be resized during execution and grow larger
and smaller on demand - again, this may be delayed for a short
while.
cheers,
felix