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