chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] Need help to understand C_mutate better.


From: Felix
Subject: Re: [Chicken-hackers] Need help to understand C_mutate better.
Date: Fri, 21 Oct 2011 13:30:08 +0200 (CEST)

> For the C_mutate, whoever has any wild guess how this
> behaviour could come up, please help me with that one.

Do you use C_mutate in C code? 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.

The stack-test you pointed out is just a small optimization, the
mutation stack is needed to keep track of pointers in the heap that
might point to data in the nursery (stack).  Adding these checks can
avoid adding the mutation-stack entry sometimes. If GC takes place
often enough (which it does in normal, compiled Scheme code), it is
probably not too much of an overhead to just add the mutation-stack
entry. 


cheers,
felix



reply via email to

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