/* -----------------------------------------------------------------------------
Generic allocation
- StgPtr allocate(nat n) Allocates a chunk of contiguous store
- n words long, returning a pointer to
- the first word. Always succeeds.
+ StgPtr allocateInGen(generation *g, nat n)
+ Allocates a chunk of contiguous store
+ n words long in generation g,
+ returning a pointer to the first word.
+ Always succeeds.
+
+ StgPtr allocate(nat n) Equaivalent to allocateInGen(g0)
StgPtr allocateLocal(Capability *cap, nat n)
Allocates memory from the nursery in
-------------------------------------------------------------------------- */
extern StgPtr allocate ( nat n );
+extern StgPtr allocateInGen ( generation *g, nat n );
extern StgPtr allocateLocal ( Capability *cap, nat n );
extern StgPtr allocatePinned ( nat n );
extern lnat allocatedBytes ( void );
((StgInfoTable *)(INFO_PTR_TO_STRUCT(p)))->type < N_CLOSURE_TYPES)
#define LOOKS_LIKE_CLOSURE_PTR(p) \
- (LOOKS_LIKE_INFO_PTR(((StgClosure *)(p))->header.info))
+ (LOOKS_LIKE_INFO_PTR((UNTAG_CLOSURE((StgClosure *)(p)))->header.info))
/* -----------------------------------------------------------------------------
Macros for calculating how big a closure will be (used during allocation)
extern void resetNurseries ( void );
extern void resizeNurseries ( nat blocks );
extern void resizeNurseriesFixed ( nat blocks );
-extern void tidyAllocateLists ( void );
extern lnat countNurseryBlocks ( void );
/* -----------------------------------------------------------------------------