static void scan_tuple(Tuple *from) { for (size_t i = 0; i < from->m_count; i++) { gc_scan(from, from->m_data[i]); } }
void scan() { for (IStream::iterator it = begin(); it != end(); it++) { gc_scan(NULL, &*it); } CallableContext::scan(); }
void Environment::scan() { if (m_context) gc_mark(NULL, &m_context); gc_scan(NULL, &m_ipos); for (size_t i = 0; i < m_vspos; i++) { gc_scan(NULL, m_vstack[i]); } for (special_map::iterator it = m_specials.begin(); it != m_specials.end(); it++) { gc_scan(NULL, it->second); } no_return_ctx.scan(); }
static void gc_scan_roots(gc_stack *stack) { gc_root_buffer *current = GC_IDX2PTR(GC_FIRST_ROOT); gc_root_buffer *last = GC_IDX2PTR(GC_G(first_unused)); while (current != last) { if (GC_IS_ROOT(current->ref)) { if (GC_REF_CHECK_COLOR(current->ref, GC_GREY)) { GC_REF_SET_COLOR(current->ref, GC_WHITE); gc_scan(current->ref, stack); } } current++; } }
static void garbagecollect(AMX amx[], int number) { int exp, usage, n; /* see whether it may be a good time to increase the table size */ gc_tablestat(&exp, &usage); if (usage > 50) { if (gc_settable(exp+1, GC_AUTOGROW) != GC_ERR_NONE) fprintf(stderr, "Warning, memory low\n"); } /* if */ /* scan all abstract machines */ for (n = 0; n < number; n++) gc_scan(&amx[n]); /* clean up unused references */ gc_clean(); }
inline void GCRef<IStream*>::scan() { gc_scan(NULL, m_val); }