#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;
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 */
The storage manager is accessed exclusively through these routines:
\begin{code}
-IF_RTS(I_ initSM PROTO((I_ rts_argc, char **rts_argv, FILE *statsfile));)
-IF_RTS(I_ exitSM PROTO((smInfo *sm));)
-IF_RTS(I_ initStacks PROTO((smInfo *sm));)
-IF_RTS(I_ initHeap PROTO((smInfo *sm));)
+IF_RTS(void initSM (STG_NO_ARGS);)
+IF_RTS(rtsBool exitSM PROTO((smInfo *sm));)
+IF_RTS(rtsBool initStacks PROTO((smInfo *sm));)
+IF_RTS(rtsBool initHeap PROTO((smInfo *sm));)
#ifdef CONCURRENT
-IF_RTS(rtsBool initThreadPool PROTO((I_ size));)
+IF_RTS(rtsBool initThreadPools (STG_NO_ARGS);)
#endif
#ifdef PAR
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 ? */
-#if defined(USE_COST_CENTRES) || defined(GUM)
+#if defined(PROFILING) || defined(PAR)
IF_RTS(void handle_tick_serial(STG_NO_ARGS);)
IF_RTS(void handle_tick_noserial(STG_NO_ARGS);)
#endif
#ifdef PAR
void EvacuateLocalGAs PROTO((rtsBool full));
-void RebuildGAtables PROTO((rtsBool full));
+void RebuildGAtables PROTO((rtsBool full));
#endif
-
\end{code}
-@initSM@ processes any runtime parameters directed towards the storage
-manager. The @statsfile@ parameter is an open file, which will contain
-any garbage collection statistics requested by the user. This file
-must be opened for writing.
+@initSM@ finalizes any runtime parameters of the storage manager.
@exitSM@ does any cleaning up required by the storage manager before
the program is executed. Its main purpose is to print any summary
@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
\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}
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 */
} stackData;
extern stackData stackInfo;
+
+#endif /* !CONCURRENT */
\end{code}
%************************************************************************
#define _INFO_MARKING
#else
-/* NO_INFO_SPECIFIED (ToDo: an #error ???) */
+/* NO_INFO_SPECIFIED (ToDo: an #error ?) */
#endif
#endif
#endif