Confirmed users, Bureaucrats and Sysops emeriti
1,217
edits
(→Multithreading: well... that's all i can think of) |
(GC_LAST_ROOTING) |
||
| Line 164: | Line 164: | ||
typedef enum gc_GCStatus { | typedef enum gc_GCStatus { | ||
GC_ROOTING | GC_ROOTING, | ||
GC_LAST_ROOTING, | |||
GC_PRE_SWEEP, | GC_PRE_SWEEP, | ||
GC_POST_SWEEP | GC_POST_SWEEP | ||
| Line 170: | Line 171: | ||
; GC_ROOTING | ; GC_ROOTING | ||
: The callback function may programmatically "root" objects by explicitly marking objects (via <tt>gc_mark_object</tt>). | : The callback function may programmatically "root" objects by explicitly marking objects (via <tt>gc_mark_object</tt>). Note that application code may re-enter after this callback, if incremental GC is being performed. | ||
; GC_LAST_ROOTING | |||
: Like the GC_ROOTING callback, the callback function may programmatically "root" objects, but client code will not run before sweeping. | |||
; GC_PRE_SWEEP | ; GC_PRE_SWEEP | ||
: At this point all marking has occurred. The callback function may synchronize external data structures by checking <tt>gc_get_markstate</tt> | : At this point all marking has occurred. The callback function may synchronize external data structures by checking <tt>gc_get_markstate</tt> | ||