X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fincludes%2FSMinterface.lh;h=4fb03e6d948610337291ca94551c0c2db2b269d2;hb=967cc47f37cb93a5e2b6df7822c9a646f0428247;hp=86279f1e2c62d45be80a6829394142086954db25;hpb=10521d8418fd3a1cf32882718b5bd28992db36fd;p=ghc-hetmet.git diff --git a/ghc/includes/SMinterface.lh b/ghc/includes/SMinterface.lh index 86279f1..4fb03e6 100644 --- a/ghc/includes/SMinterface.lh +++ b/ghc/includes/SMinterface.lh @@ -54,10 +54,10 @@ typedef struct { #endif #ifndef PAR - P_ MallocPtrList; /* List of all Malloc Pointers (in new generation) */ + P_ ForeignObjList; /* List of all Foreign objects (in new generation) */ #if defined(GCap) || defined(GCgn) - P_ OldMallocPtrList; /* List of all Malloc Pointers in old generation */ + P_ OldForeignObjList; /* List of all Foreign objects in old generation */ #endif P_ StablePointerTable; @@ -78,15 +78,14 @@ Question: Where are the stable pointer roots? (JSM) Answer: They're on the heap in a "Stable Pointer Table". (ADR) \begin{code} #ifndef CONCURRENT -# define SM_MAXROOTS 8 /* 8 Vanilla Regs */ +# define SM_MAXROOTS 9 /* 8 Vanilla Regs + stable pointer table*/ #else # ifndef PAR # ifdef GRAN -# define SM_MAXROOTS (10 + (MAX_PROC*4) + 2 + (MAX_PROC*2) + MAX_SPARKS) - /* unthreaded + spark/thread queues + Current/Main TSOs - + events + sparks */ +# define SM_MAXROOTS (10 + (MAX_PROC*2) + 2 ) + /* unthreaded + hd/tl thread queues + Current/Main TSOs */ # else -# define SM_MAXROOTS 5 /* See c-as-asm/HpOverflow.lc */ +# define SM_MAXROOTS 6 /* See c-as-asm/HpOverflow.lc */ # endif # else # define SM_MAXROOTS 6 /* See c-as-asm/HpOverflow.lc */ @@ -107,7 +106,7 @@ IF_RTS(rtsBool initThreadPools (STG_NO_ARGS);) IF_RTS(void init_gr_profiling PROTO((int, char **, int, char **));) #endif -I_ collectHeap PROTO((W_ reqsize, smInfo *sm, rtsBool do_full_collection)); +I_ collectHeap PROTO((W_ reqsize, smInfo *sm, rtsBool do_full_collection)); IF_RTS(void unmapMiddleStackPage PROTO((char *, int));) /* char * == caddr_t ? */ @@ -125,9 +124,8 @@ void end_init(STG_NO_ARGS); #ifdef PAR void EvacuateLocalGAs PROTO((rtsBool full)); -void RebuildGAtables PROTO((rtsBool full)); +void RebuildGAtables PROTO((rtsBool full)); #endif - \end{code} @initSM@ finalizes any runtime parameters of the storage manager. @@ -150,7 +148,7 @@ roots. If we are using Appel's collector it also initialises the @OldLim@ field. In the sequential system, it also initialises the stable pointer table -and the @MallocPtr@ (and @OldMallocPtrList@) fields. +and the @ForeignObjList@ (and @OldForeignObjList@) fields. @collectHeap@ invokes the garbage collector that was requested at compile time. @reqsize@ is the size of the request (in words) that @@ -197,9 +195,9 @@ B stack arising from any update frame ``squeezing'' [sequential only]. \item The elements of @CAFlist@ and the stable pointers will be updated to point to the new locations of the closures they reference. -\item Any members of @MallocPtrList@ which became garbage should have -been reported (by calling @FreeMallocPtr@; and the @(Old)MallocPtrList@ -updated to contain only those Malloc Pointers which are still live. +\item Any members of @ForeignObjList@ which became garbage should have +been reported (by calling their finalising routines; and the @(Old)ForeignObjList@ +updated to contain only those Foreign objects which are still live. \end{itemize} \end{description} @@ -433,6 +431,7 @@ same, but without the saved SuA pointer. We store the following information concerning the stacks in a global structure. (sequential only). \begin{code} +#if 1 /* ndef CONCURRENT * /? HWL */ typedef struct { PP_ botA; /* Points to bottom-most word of A stack */ @@ -440,6 +439,8 @@ typedef struct { } stackData; extern stackData stackInfo; + +#endif /* !CONCURRENT */ \end{code} %************************************************************************ @@ -452,22 +453,21 @@ Each garbage collector requires different garbage collection entries in the info-table. \begin{code} -#if defined(GC2s) -#define _INFO_COPYING -#else -#if defined(GC1s) +#if defined(GCdu) || defined (GCap) || defined (GCgn) +#define _INFO_COPYING #define _INFO_COMPACTING #define _INFO_MARKING - #else -#if defined(GCdu) || defined (GCap) || defined (GCgn) +#if defined(GC2s) #define _INFO_COPYING + +#else +#if defined(GC1s) #define _INFO_COMPACTING #define _INFO_MARKING - #else -/* NO_INFO_SPECIFIED (ToDo: an #error ???) */ +/* NO_INFO_SPECIFIED (ToDo: an #error ?) */ #endif #endif #endif