示例#1
0
	static void scan_tuple(Tuple *from)
	{
		for (size_t i = 0; i < from->m_count; i++)
		{
			gc_scan(from, from->m_data[i]);
		}
	}
示例#2
0
		void scan()
		{
			for (IStream::iterator it = begin(); it != end(); it++)
			{
				gc_scan(NULL, &*it);
			}
			CallableContext::scan();
		}
示例#3
0
	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();
	}
示例#4
0
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++;
	}
}
示例#5
0
文件: prun5.c 项目: DevCortez/vaultmp
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();
}
示例#6
0
	inline void GCRef<IStream*>::scan()
	{
		gc_scan(NULL, m_val);
	}