projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
change of representation for GenCmm, GenCmmTop, CmmProc
[ghc-hetmet.git]
/
rts
/
Sparks.c
diff --git
a/rts/Sparks.c
b/rts/Sparks.c
index
40ebcad
..
0ff4ee4
100644
(file)
--- a/
rts/Sparks.c
+++ b/
rts/Sparks.c
@@
-63,6
+63,11
@@
initSparkPools( void )
#endif
}
#endif
}
+void
+freeSparkPool(StgSparkPool *pool) {
+ stgFree(pool->base);
+}
+
/* -----------------------------------------------------------------------------
*
* findSpark: find a spark on the current Capability that we can fork
/* -----------------------------------------------------------------------------
*
* 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);
{
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)) {
ASSERT_SPARK_POOL_INVARIANTS(pool);
if (closure_SHOULD_SPARK(p)) {