via allocate() since the last GC.
Used in the reporting of statistics.
- SMP: allocate and doYouWantToGC can be used from STG code, they are
+ THREADED_RTS: allocate and doYouWantToGC can be used from STG code, they are
surrounded by a mutex.
-------------------------------------------------------------------------- */
/*
* Storage manager mutex
*/
-#if defined(SMP)
+#if defined(THREADED_RTS)
extern Mutex sm_mutex;
+extern Mutex atomic_modify_mutvar_mutex;
#endif
-#if defined(SMP)
+#if defined(THREADED_RTS)
#define ACQUIRE_SM_LOCK ACQUIRE_LOCK(&sm_mutex);
#define RELEASE_SM_LOCK RELEASE_LOCK(&sm_mutex);
#define ASSERT_SM_LOCK() ASSERT_LOCK_HELD(&sm_mutex);
and is put on the mutable list.
-------------------------------------------------------------------------- */
-void dirty_MUT_VAR(StgClosure *p);
+void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p);
/* -----------------------------------------------------------------------------
DEBUGGING predicates for pointers
case FUN_2_0:
case CONSTR_2_0:
return sizeofW(StgHeader) + 2;
+ case THUNK:
+ return thunk_sizeW_fromITBL(info);
case THUNK_SELECTOR:
return THUNK_SELECTOR_sizeW();
case AP_STACK:
}
}
+// The definitive way to find the size, in words, of a heap-allocated closure
STATIC_INLINE nat
closure_sizeW (StgClosure *p)
{