Changeset 10956


Ignore:
Timestamp:
Oct 3, 2008, 5:18:25 PM (11 years ago)
Author:
gb
Message:

In CommitMemory?() on Windows, ensure that the static area is writable
(might be mapped but in .text).

File:
1 edited

Legend:

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

    r10887 r10956  
    216216
    217217int
    218 CommitMemory (LogicalAddress start, natural len) {
     218CommitMemory (LogicalAddress start, natural len)
     219{
    219220  LogicalAddress rc;
    220221#if DEBUG_MEMORY
     
    224225  if ((start < ((LogicalAddress)nil_value)) &&
    225226      (((LogicalAddress)nil_value) < (start+len))) {
    226     /* nil area is in the executable on Windows, do nothing */
     227    /* nil area is in the executable on Windows; ensure range is
     228       read-write */
     229    DWORD as_if_i_care;
     230    if (!VirtualProtect(start,len,PAGE_EXECUTE_READWRITE,&as_if_i_care)) {
     231      return false;
     232    }
    227233    return true;
    228234  }
Note: See TracChangeset for help on using the changeset viewer.