X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=includes%2Frts%2Fstorage%2FGC.h;fp=includes%2Frts%2Fstorage%2FGC.h;h=b30582dfd7dfc54a2412bbd2aa30d05914b14442;hb=254528e32a007e508bb5967948ba02aa15c7e482;hp=df4ba9d15334b2402fa9b33f62b90087cd6ced36;hpb=95ec750f94236c2ae127a147d7c9bebec036bcab;p=ghc-hetmet.git diff --git a/includes/rts/storage/GC.h b/includes/rts/storage/GC.h index df4ba9d..b30582d 100644 --- a/includes/rts/storage/GC.h +++ b/includes/rts/storage/GC.h @@ -182,6 +182,10 @@ lnat allocatedBytes ( void ); void * allocateExec(unsigned int len, void **exec_addr); void freeExec (void *p); +// Used by GC checks in external .cmm code: +extern nat alloc_blocks; +extern nat alloc_blocks_lim; + /* ----------------------------------------------------------------------------- Performing Garbage Collection -------------------------------------------------------------------------- */ @@ -197,6 +201,15 @@ void newCAF (StgClosure*); void newDynCAF (StgClosure *); void revertCAFs (void); +/* ----------------------------------------------------------------------------- + This is the write barrier for MUT_VARs, a.k.a. IORefs. A + MUT_VAR_CLEAN object is not on the mutable list; a MUT_VAR_DIRTY + is. When written to, a MUT_VAR_CLEAN turns into a MUT_VAR_DIRTY + and is put on the mutable list. + -------------------------------------------------------------------------- */ + +void dirty_MUT_VAR(StgRegTable *reg, StgClosure *p); + /* set to disable CAF garbage collection in GHCi. */ /* (needed when dynamic libraries are used). */ extern rtsBool keepCAFs;