void markStablePtrTable(evac_fn evac, void *user) { /* Since no other thread can currently be dereferencing a stable pointer, it * is safe to free the old versions of the table. */ freeOldSPTs(); FOR_EACH_STABLE_PTR(p, evac(user, (StgClosure **)&p->addr););
void exitStablePtrTable(void) { if (stable_ptr_table) stgFree(stable_ptr_table); stable_ptr_table = NULL; SPT_size = 0; freeOldSPTs(); #if defined(THREADED_RTS) closeMutex(&stable_ptr_mutex); #endif }
void exitStableTables(void) { if (addrToStableHash) freeHashTable(addrToStableHash, NULL); addrToStableHash = NULL; if (stable_name_table) stgFree(stable_name_table); stable_name_table = NULL; SNT_size = 0; if (stable_ptr_table) stgFree(stable_ptr_table); stable_ptr_table = NULL; SPT_size = 0; freeOldSPTs(); #ifdef THREADED_RTS closeMutex(&stable_mutex); #endif }