X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSparks.c;h=0ff4ee4cceaef9227b227e437775ee542d4351d0;hb=decf06a77b1331d3af9304e55164bb0a51c15a7f;hp=c7a1c9f98a8da7c148a496238c43aca17e3bfb3f;hpb=e2eebc0d70de13de6d58e2af89f90ec71e54375c;p=ghc-hetmet.git diff --git a/rts/Sparks.c b/rts/Sparks.c index c7a1c9f..0ff4ee4 100644 --- a/rts/Sparks.c +++ b/rts/Sparks.c @@ -8,9 +8,9 @@ #include "PosixSource.h" #include "Rts.h" +#include "Storage.h" #include "Schedule.h" #include "SchedAPI.h" -#include "Storage.h" #include "RtsFlags.h" #include "RtsUtils.h" #include "ParTicky.h" @@ -63,6 +63,11 @@ initSparkPools( void ) #endif } +void +freeSparkPool(StgSparkPool *pool) { + stgFree(pool->base); +} + /* ----------------------------------------------------------------------------- * * findSpark: find a spark on the current Capability that we can fork @@ -195,6 +200,12 @@ newSpark (StgRegTable *reg, StgClosure *p) { StgSparkPool *pool = &(reg->rSparks); + /* I am not sure whether this is the right thing to do. + * Maybe it is better to exploit the tag information + * instead of throwing it away? + */ + p = UNTAG_CLOSURE(p); + ASSERT_SPARK_POOL_INVARIANTS(pool); if (closure_SHOULD_SPARK(p)) {