Changeset 10022


Ignore:
Timestamp:
Jul 14, 2008, 12:19:13 PM (11 years ago)
Author:
gb
Message:

Solaris doesn't seem to like the use of mprotect() in UnProtectMemory?,
so do it via mmap(). (OpenSolaris? ships with most man pages missing.)
It's not clear that we want to conflate changing protection with
re-mapping this way, but the call to mprotect() just hangs.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/memory.c

    r9901 r10022  
    9090UnProtectMemory(LogicalAddress addr, natural nbytes)
    9191{
     92#ifdef SOLARIS
     93  return addr == mmap(addr,nbytes,PROT_READ|PROT_WRITE|PROT_EXEC,
     94                      MAP_PRIVATE | MAP_FIXED | MAP_ANON,-1,0);
     95#else
    9296  return mprotect(addr, nbytes, PROT_READ|PROT_WRITE|PROT_EXEC);
     97#endif
    9398}
    9499
Note: See TracChangeset for help on using the changeset viewer.