1 /* -----------------------------------------------------------------------------
2 * $Id: StgStorage.h,v 1.4 1999/03/02 19:44:21 sof Exp $
4 * (c) The GHC Team, 1998-1999
6 * STG Storage Manger Interface
8 * ---------------------------------------------------------------------------*/
15 extern DLL_IMPORT_RTS bdescr *current_nursery;
17 /* -----------------------------------------------------------------------------
18 Allocation area for compiled code
20 OpenNursery(hp,hplim) Opens the allocation area, and sets hp
21 and hplim appropriately.
23 CloseNursery(hp) Closes the allocation area.
25 PleaseStopAllocating(void) Arranges that the next call to
26 ExtendNursery() will fail, triggering
27 a return to the scheduler. This is
28 useful for asynchronous interupts etc.
29 -------------------------------------------------------------------------- */
31 #define OpenNursery(hp,hplim) \
32 (hp = current_nursery->free-1, \
33 hplim = current_nursery->start + BLOCK_SIZE_W - 1)
35 #define CloseNursery(hp) (current_nursery->free = (P_)(hp)+1)
37 /* -----------------------------------------------------------------------------
38 Trigger a GC from Haskell land.
39 -------------------------------------------------------------------------- */
41 extern void performGC(void);
42 extern void performGCWithRoots(void (*get_roots)(void));
44 #endif /* STGSTORAGE_H */