Exemplo n.º 1
0
void juGC_step ()
{
	if (first(GREY) != NULL)
		make_black(first(GREY));
	else
		juGC_end();
}
Exemplo n.º 2
0
	void GarbageCollector::scan_greys(size_t max)
	{
		GCMarker* v = greys->next;
		GCMarker* new_next;
		unsigned int c = greys->colour;

		while(v->colour == c)
		{
			new_next = v->next;

			// Scan children, then make the node black.
			v->walk();
			make_black(v);

			if(--max == 0)
				break;

			v = new_next;
		}
	}