|
From: | Jörg F . Wittenberger |
Subject: | Re: [Chicken-hackers] Need help to understand C_mutate better. |
Date: | 21 Oct 2011 15:58:17 +0200 |
On Oct 21 2011, Jörg F. Wittenberger wrote:
The mutation stack will grow until a garbage collection takes place, so if you invoke C_mutate in a C loop without giving GC a chance, the mutations will just add up.
Reading C_reclaim still without fully understanding how exactly is will interact with C_context_switch it appears to me that if there where always an interrupt pending (or at least too often) then chicken would dispatch to the interrupt handler, which will switch context. I don't see how the C code would return to the (minor) gc. In handle_interrupt is even mentioned that it must not return. If the next signal arrives before the next gc run this would take the same path. This way the mutation stack will grow. Slightly at first, but the larger it becomes, the longer it takes to relocate, thereby increasing the probability of yet another turn. If that was correct, it looks as if it would be better to move the interrupt handling towards the end of gc. (Not sure that I could do that.) Given that what I have to do to kickstart the excessive memory consumption it involves massive handling signals and i/o. /Jörg
[Prev in Thread] | Current Thread | [Next in Thread] |