[project @ 2003-02-13 01:50:04 by sof]
[ghc-hetmet.git] / ghc / rts / MBlock.c
index 590c556..93478a2 100644 (file)
@@ -1,5 +1,5 @@
 /* -----------------------------------------------------------------------------
- * $Id: MBlock.c,v 1.39 2002/11/22 06:54:05 matthewc Exp $
+ * $Id: MBlock.c,v 1.42 2002/12/11 15:36:42 simonmar Exp $
  *
  * (c) The GHC Team 1998-1999
  *
@@ -121,7 +121,7 @@ my_mmap (void *addr, int size)
     else
        vm_protect(mach_task_self(),ret,size,FALSE,VM_PROT_READ|VM_PROT_WRITE);
 #else
-    ret = mmap(addr, size, PROT_READ | PROT_WRITE, 
+    ret = mmap(addr, size, PROT_READ | PROT_WRITE | PROT_EXEC, 
               MAP_ANON | MAP_PRIVATE, -1, 0);
 #endif
 
@@ -188,10 +188,10 @@ getMBlocks(nat n)
 
       if (((W_)ret & MBLOCK_MASK) != 0) {
          // misaligned block!
-#ifdef DEBUG
+#if 0 // defined(DEBUG)
          belch("warning: getMBlock: misaligned block %p returned when allocating %d megablock(s) at %p", ret, n, next_request);
 #endif
-         
+
          // unmap this block...
          if (munmap(ret, size) == -1) {
              barf("getMBlock: munmap failed");
@@ -312,7 +312,7 @@ getMBlocks(nat n)
   
   // fill in the table
   for (i = 0; i < n; i++) {
-      mblockIsHeap( ret + i * MBLOCK_SIZE );
+      MARK_HEAP_ALLOCED ( ret + i * MBLOCK_SIZE );
   }
 
   return ret;