X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FSparks.c;h=0ff4ee4cceaef9227b227e437775ee542d4351d0;hb=9d03becc597e5b1ab6c8466209a1263bf8ba6f29;hp=40ebcad7a714f4d95daae2429abb748cebbea11a;hpb=ab0e778ccfde61aed4c22679b24d175fc6cc9bf3;p=ghc-hetmet.git diff --git a/rts/Sparks.c b/rts/Sparks.c index 40ebcad..0ff4ee4 100644 --- a/rts/Sparks.c +++ b/rts/Sparks.c @@ -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)) {