Tue May 30 03:02:11 PDT 2006  Simon Marlow <[EMAIL PROTECTED]>
  * replace stgMallocBytesRWX() with our own allocator
  
  See bug #738
  
  Allocating executable memory is getting more difficult these days.  In
  particular, the default SELinux policy on Fedora Core 5 disallows
  making the heap (i.e. malloc()'d memory) executable, although it does
  apparently allow mmap()'ing anonymous executable memory by default.
  
  Previously, stgMallocBytesRWX() used malloc() underneath, and then
  tried to make the page holding the memory executable.  This was rather
  hacky and fails with Fedora Core 5.  
  
  This patch adds a mini-allocator for executable memory, based on the
  block allocator.  We grab page-sized blocks and make them executable,
  then allocate small objects from the page.  There's a simple free
  function, that will free whole pages back to the system when they are
  empty.
  

    M ./includes/Block.h -1 +3
    M ./includes/Storage.h +4
    M ./rts/Adjustor.c -11 +12
    M ./rts/Linker.c -1 +2
    A ./rts/OSMem.h
    M ./rts/RtsUtils.c -52
    M ./rts/RtsUtils.h -3
    M ./rts/Storage.c +99
    A ./rts/posix/OSMem.c
    A ./rts/win32/OSMem.c
_______________________________________________
Cvs-ghc mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to