|
From: | Jörg F . Wittenberger |
Subject: | Re: [Chicken-hackers] Need help to understand C_mutate better. |
Date: | 21 Oct 2011 18:10:44 +0200 |
From that theory I've been working in trial&error mode again.
I added a (gc) call to the end of my SIGCHLD handler. Guess what: It did not run into the first, almost-for-sure case. Often enough to make me walk the dog waiting for the second case: the laptop coming back from a longer suspension period. Now I wonder: as far as I understand C_mutate it will remember all assignments where the assigned value in within the nursery. True? If true, than I don't understand why we allow the mutation_stack to ever grow beyond the size of the nursery. So far untested/unimplemented (I'd rather get that understanding of the mutation stack before I continue here): If we would check a mutation stack usage limit before the interrupt limit and at least enforce a minor gc on excess, we might be able to leave the interrupt handling at the begin of the C_reclaim and still avoid running havoc. Reasonable? /Jörg
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.
[Prev in Thread] | Current Thread | [Next in Thread] |