projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added stack checks to the CPS algorithm
[ghc-hetmet.git]
/
includes
/
Storage.h
diff --git
a/includes/Storage.h
b/includes/Storage.h
index
1346715
..
604e49e
100644
(file)
--- a/
includes/Storage.h
+++ b/
includes/Storage.h
@@
-118,6
+118,12
@@
extern void freeStorage(void);
n words long, returning a pointer to
the first word. Always succeeds.
n words long, returning a pointer to
the first word. Always succeeds.
+ StgPtr allocateLocal(Capability *cap, nat n)
+ Allocates memory from the nursery in
+ the current Capability. This can be
+ done without taking a global lock,
+ unlike allocate().
+
StgPtr allocatePinned(nat n) Allocates a chunk of contiguous store
n words long, which is at a fixed
address (won't be moved by GC).
StgPtr allocatePinned(nat n) Allocates a chunk of contiguous store
n words long, which is at a fixed
address (won't be moved by GC).
@@
-141,8
+147,6
@@
extern void freeStorage(void);
via allocate() since the last GC.
Used in the reporting of statistics.
via allocate() since the last GC.
Used in the reporting of statistics.
- THREADED_RTS: allocate and doYouWantToGC can be used from STG code, they are
- surrounded by a mutex.
-------------------------------------------------------------------------- */
extern StgPtr allocate ( nat n );
-------------------------------------------------------------------------- */
extern StgPtr allocate ( nat n );
@@
-181,7
+185,7
@@
extern void freeExec (void *p);
MarkRoot(StgClosure *p) Returns the new location of the root.
-------------------------------------------------------------------------- */
MarkRoot(StgClosure *p) Returns the new location of the root.
-------------------------------------------------------------------------- */
-extern void GarbageCollect(void (*get_roots)(evac_fn),rtsBool force_major_gc);
+extern void GarbageCollect(rtsBool force_major_gc);
/* -----------------------------------------------------------------------------
Generational garbage collection support
/* -----------------------------------------------------------------------------
Generational garbage collection support
@@
-358,7
+362,7
@@
INLINE_HEADER StgWord tso_sizeW ( StgTSO *tso )
INLINE_HEADER StgWord bco_sizeW ( StgBCO *bco )
{ return bco->size; }
INLINE_HEADER StgWord bco_sizeW ( StgBCO *bco )
{ return bco->size; }
-STATIC_INLINE nat
+INLINE_HEADER nat
closure_sizeW_ (StgClosure *p, StgInfoTable *info)
{
switch (info->type) {
closure_sizeW_ (StgClosure *p, StgInfoTable *info)
{
switch (info->type) {
@@
-388,6
+392,7
@@
closure_sizeW_ (StgClosure *p, StgInfoTable *info)
case AP_STACK:
return ap_stack_sizeW((StgAP_STACK *)p);
case AP:
case AP_STACK:
return ap_stack_sizeW((StgAP_STACK *)p);
case AP:
+ return ap_sizeW((StgAP *)p);
case PAP:
return pap_sizeW((StgPAP *)p);
case IND:
case PAP:
return pap_sizeW((StgPAP *)p);
case IND:
@@
-424,7
+429,7
@@
closure_sizeW_ (StgClosure *p, StgInfoTable *info)
}
// The definitive way to find the size, in words, of a heap-allocated closure
}
// The definitive way to find the size, in words, of a heap-allocated closure
-STATIC_INLINE nat
+INLINE_HEADER nat
closure_sizeW (StgClosure *p)
{
return closure_sizeW_(p, get_itbl(p));
closure_sizeW (StgClosure *p)
{
return closure_sizeW_(p, get_itbl(p));
@@
-453,7
+458,6
@@
INLINE_HEADER StgWord stack_frame_sizeW( StgClosure *frame )
return sizeofW(StgRetFun) + ((StgRetFun *)frame)->size;
case RET_BIG:
return sizeofW(StgRetFun) + ((StgRetFun *)frame)->size;
case RET_BIG:
- case RET_VEC_BIG:
return 1 + GET_LARGE_BITMAP(&info->i)->size;
case RET_BCO:
return 1 + GET_LARGE_BITMAP(&info->i)->size;
case RET_BCO:
@@
-479,6
+483,8
@@
extern lnat countNurseryBlocks ( void );
Functions from GC.c
-------------------------------------------------------------------------- */
Functions from GC.c
-------------------------------------------------------------------------- */
+typedef void (*evac_fn)(StgClosure **);
+
extern void threadPaused ( Capability *cap, StgTSO * );
extern StgClosure * isAlive ( StgClosure *p );
extern void markCAFs ( evac_fn evac );
extern void threadPaused ( Capability *cap, StgTSO * );
extern StgClosure * isAlive ( StgClosure *p );
extern void markCAFs ( evac_fn evac );