library/src/garbage_collection/BP_MemoryGarbageCollector.cc
// gets the last chunk in the garbage collectors list
gets the last chunk in the garbage collectors list
gets the last chunk in the garbage collectors list
P_BP_GARBAGE_COLLECTOR_ALLOC_CHUNK BP_GarbageCollectorGetLastChunk(P_BP_GARBAGE_COLLECTOR_DATA gc)
{
	if(!gc)
		return NULL;
	if(!gc->chunks)
		return NULL;
	P_BP_GARBAGE_COLLECTOR_ALLOC_CHUNK chunks = gc->chunks->first;
	for(; chunks; chunks = chunks->next)
	{
		if(!chunks->next)
			break;
	}
	return chunks;
}
P_BP_GARBAGE_COLLECTOR_ALLOC_CHUNK BP_GarbageCollectorGetLastChunk ( P_BP_GARBAGE_COLLECTOR_DATA gc ) { if ( ! gc ) return NULL ; if ( ! gc -> chunks ) return NULL ; P_BP_GARBAGE_COLLECTOR_ALLOC_CHUNK chunks = gc -> chunks -> first ; for ( ; chunks ; chunks = chunks -> next ) { if ( ! chunks -> next ) break ; } return chunks ; }
gets the last chunk in the garbage collectors list
gets the last chunk in the garbage collectors list
// return null if there is no garbage collection // use first pointer as a walker // walk the list elements // return the last pointer