mirror of
https://github.com/justinethier/cyclone.git
synced 2025-05-23 20:15:05 +02:00
Revised
This commit is contained in:
parent
76b5cbce00
commit
78c7ca1667
1 changed files with 3 additions and 1 deletions
|
@ -195,9 +195,11 @@ This function is called by a mutator to allocate memory on the heap for an objec
|
|||
|
||||
A write barrier is used to ensure any modified objects are properly marked for the current collection cycle. There are two cases:
|
||||
|
||||
- Gray the object's new and old values if the mutator is in a synchronous status. Graying of the new value is a special case since it may still be on the stack. Instead of marking it directly, the object is tagged to be grayed when it is relocated to the heap.
|
||||
- Gray the object's new and old values if the mutator is in a synchronous status.
|
||||
- Gray the object's old value if the collector is in the tracing stage.
|
||||
|
||||
Because updates can occur at any time a modified object may still live on the stack. In this case the object is tagged to be grayed when it is relocated to the heap.
|
||||
|
||||
### Cooperate
|
||||
|
||||
Each mutator is required to periodically call this function to cooperate with the collector. During cooperation a mutator will update its status to match the collector's status, to handshake with the collector.
|
||||
|
|
Loading…
Add table
Reference in a new issue