projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove warning: Correct includes for mingw
[ghc-hetmet.git]
/
rts
/
Stable.c
diff --git
a/rts/Stable.c
b/rts/Stable.c
index
2391cb1
..
2c4157b
100644
(file)
--- a/
rts/Stable.c
+++ b/
rts/Stable.c
@@
-159,6
+159,18
@@
initStablePtrTable(void)
#endif
}
#endif
}
+void
+exitStablePtrTable(void)
+{
+ if (addrToStableHash)
+ freeHashTable(addrToStableHash, NULL);
+ addrToStableHash = NULL;
+ if (stable_ptr_table)
+ stgFree(stable_ptr_table);
+ stable_ptr_table = NULL;
+ SPT_size = 0;
+}
+
/*
* get at the real stuff...remove indirections.
*
/*
* get at the real stuff...remove indirections.
*
@@
-400,15
+412,15
@@
gcStablePtrTable( void )
if (p->sn_obj == NULL) {
// StableName object is dead
freeStableName(p);
if (p->sn_obj == NULL) {
// StableName object is dead
freeStableName(p);
- debugTrace(DEBUG_stable, "GC'd Stable name %ld",
- p - stable_ptr_table);
+ debugTrace(DEBUG_stable, "GC'd Stable name %ld",
+ (long)(p - stable_ptr_table));
continue;
} else {
p->addr = (StgPtr)isAlive((StgClosure *)p->addr);
debugTrace(DEBUG_stable,
"stable name %ld still alive at %p, ref %ld\n",
continue;
} else {
p->addr = (StgPtr)isAlive((StgClosure *)p->addr);
debugTrace(DEBUG_stable,
"stable name %ld still alive at %p, ref %ld\n",
- p - stable_ptr_table, p->addr, p->ref);
+ (long)(p - stable_ptr_table), p->addr, p->ref);
}
}
}
}
}
}