1 /* -----------------------------------------------------------------------------
2 * $Id: StgStorage.h,v 1.5 1999/11/02 15:05:53 simonmar Exp $
4 * (c) The GHC Team, 1998-1999
6 * STG Storage Manger Interface
8 * ---------------------------------------------------------------------------*/
13 /* -----------------------------------------------------------------------------
14 Allocation area for compiled code
16 OpenNursery(hp,hplim) Opens the allocation area, and sets hp
17 and hplim appropriately.
19 CloseNursery(hp) Closes the allocation area.
21 PleaseStopAllocating(void) Arranges that the next call to
22 ExtendNursery() will fail, triggering
23 a return to the scheduler. This is
24 useful for asynchronous interupts etc.
25 -------------------------------------------------------------------------- */
27 #define OpenNursery(hp,hplim) \
28 (hp = CurrentNursery->free-1, \
29 hplim = CurrentNursery->start + BLOCK_SIZE_W - 1)
31 #define CloseNursery(hp) (CurrentNursery->free = (P_)(hp)+1)
33 /* -----------------------------------------------------------------------------
34 Trigger a GC from Haskell land.
35 -------------------------------------------------------------------------- */
37 extern void performGC(void);
38 extern void performGCWithRoots(void (*get_roots)(void));
40 #endif /* STGSTORAGE_H */