library/src/garbage_collection/BP_MemoryGarbageCollector.cc
// Creates a new and ready to use garbage collector structure.  Use the returned
// structure as input for garbage collection routines below.
Creates a new and ready to use garbage collector structure.  Use the returned
structure as input for garbage collection routines below.
Creates a new and ready to use garbage collector structure . Use the returned structure as input for garbage collection routines below .
P_BP_GARBAGE_COLLECTOR_DATA BP_CreateNewGarbageCollector(char * description, size_t chunk_monitoring_enabled)
{
	P_BP_GARBAGE_COLLECTOR_DATA new_collector = (P_BP_GARBAGE_COLLECTOR_DATA) bpcalloc(sizeof(BP_GARBAGE_COLLECTOR_DATA), 1);
	if(description)
	{
		snprintf(new_collector->collector_description, 256, "%s", description);
	}
	if(chunk_monitoring_enabled)
	{
		new_collector->monitor_chunks=1;
	}
	return new_collector;
}
P_BP_GARBAGE_COLLECTOR_DATA BP_CreateNewGarbageCollector ( char * description , size_t chunk_monitoring_enabled ) { P_BP_GARBAGE_COLLECTOR_DATA new_collector = ( P_BP_GARBAGE_COLLECTOR_DATA ) bpcalloc ( sizeof ( BP_GARBAGE_COLLECTOR_DATA ) , 1 ) ; if ( description ) { snprintf ( new_collector -> collector_description , 256 , " " , description ) ; } if ( chunk_monitoring_enabled ) { new_collector -> monitor_chunks = 1 ; } return new_collector ; }
Creates a new and ready to use garbage collector structure.
Creates a new and ready to use garbage collector structure .
// allocate new collector structure // set description if set // copy in description up to limit // if set for monitoring, set the toggle // return the new collector