Changeset 10629


Ignore:
Timestamp:
Sep 8, 2008, 5:47:00 AM (11 years ago)
Author:
gb
Message:

Handle making executable pages (for callback trampolines) on Windows.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-callbacks.lisp

    r6934 r10629  
    142142;;;
    143143(defun %make-executable-page ()
     144  #-windows-target
    144145  (#_mmap (%null-ptr)
    145146          (#_getpagesize)
     
    147148          (logior #$MAP_PRIVATE #$MAP_ANON)
    148149          -1
    149           0))
     150          0)
     151  #+windows-target
     152  (#_VirtualAlloc (%null-ptr)
     153                  (ash 1 16)            ; should use GetSystemInfo
     154                  (logior #$MEM_RESERVE #$MEM_COMMIT)
     155                  #$PAGE_EXECUTE_READWRITE)
     156  )
    150157
    151158(defstatic *available-bytes-for-callbacks* 0)
     
    153160
    154161(defun reset-callback-storage ()
    155   (setq *available-bytes-for-callbacks* (#_getpagesize)
     162  (setq *available-bytes-for-callbacks* #-windows-target (#_getpagesize) #+windows-target (ash 1 16)
    156163        *current-callback-page* (%make-executable-page)))
    157164
Note: See TracChangeset for help on using the changeset viewer.