Fix building with GHC 6.8
[ghc-hetmet.git] / rts / sm / MBlock.h
index 1cc0dc5..ef6f8de 100644 (file)
@@ -1,9 +1,12 @@
 /* -----------------------------------------------------------------------------
  *
- * (c) The GHC Team, 1998-2005
+ * (c) The GHC Team, 1998-2008
  *
  * MegaBlock Allocator interface.
  *
+ * See wiki commentary at
+ *  http://hackage.haskell.org/trac/ghc/wiki/Commentary/HeapAlloced
+ *
  * ---------------------------------------------------------------------------*/
 
 #ifndef MBLOCK_H
 
 extern lnat RTS_VAR(mblocks_allocated);
 
+extern void initMBlocks(void);
 extern void * getMBlock(void);
 extern void * getMBlocks(nat n);
 extern void freeAllMBlocks(void);
 
-#if osf3_HOST_OS
-/* ToDo: Perhaps by adjusting this value we can make linking without
- * -static work (i.e., not generate a core-dumping executable)? */
-#if SIZEOF_VOID_P == 8
-#define HEAP_BASE 0x180000000L
-#else
-#error I have no idea where to begin the heap on a non-64-bit osf3 machine.
-#endif
-
-#else
-
-// we're using the generic method
-#define HEAP_BASE 0
-
+#ifdef DEBUG
+extern void *getFirstMBlock(void);
+extern void *getNextMBlock(void *mblock);
 #endif
 
 /* -----------------------------------------------------------------------------
@@ -37,6 +30,9 @@ extern void freeAllMBlocks(void);
    HEAP_ALLOCED is called FOR EVERY SINGLE CLOSURE during GC.
    It needs to be FAST.
 
+   See wiki commentary at
+     http://hackage.haskell.org/trac/ghc/wiki/Commentary/HeapAlloced
+
    Implementation of HEAP_ALLOCED
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~