summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorSimon Marlow <simonmar@microsoft.com>2007-10-12 12:44:13 +0000
committerSimon Marlow <simonmar@microsoft.com>2007-10-12 12:44:13 +0000
commitc1540c3def6281ea67b5a4ce7499b1aa982faa25 (patch)
tree0c1faa326af3cf88b05b196f9488f0d470518478 /includes
parent05b677fad57427a5639b36a1822c9ebd52cb3339 (diff)
downloadhaskell-c1540c3def6281ea67b5a4ce7499b1aa982faa25.tar.gz
Add allocateInGen() for allocating in a specific generation, and cleanups
Now allocate() is a synonym for allocateInGen(). I also made various cleanups: there is now less special-case code for supporting -G1 (two-space collection), and -G1 now works with -threaded.
Diffstat (limited to 'includes')
-rw-r--r--includes/Storage.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/includes/Storage.h b/includes/Storage.h
index 92a856c963..9257bcd3b5 100644
--- a/includes/Storage.h
+++ b/includes/Storage.h
@@ -114,9 +114,13 @@ extern void freeStorage(void);
/* -----------------------------------------------------------------------------
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
@@ -150,6 +154,7 @@ extern void freeStorage(void);
-------------------------------------------------------------------------- */
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 );
@@ -476,7 +481,6 @@ extern void allocNurseries ( void );
extern void resetNurseries ( void );
extern void resizeNurseries ( nat blocks );
extern void resizeNurseriesFixed ( nat blocks );
-extern void tidyAllocateLists ( void );
extern lnat countNurseryBlocks ( void );
/* -----------------------------------------------------------------------------