Ignore:
Timestamp:
Sep 10, 2009, 3:43:00 PM (11 years ago)
Author:
rme
Message:

Scan AREA_WATCHED areas. Un-protect watched areas during GC using new
functions protect_watched_areas() and unprotect_watched_areas().

File:
1 edited

Legend:

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

    r11986 r12806  
    948948  pure_space_active = pure_space_start;
    949949}
     950
     951void
     952protect_watched_areas()
     953{
     954  area *a = active_dynamic_area;
     955  natural code = a->code;
     956
     957  while (code != AREA_VOID) {
     958    if (code == AREA_WATCHED) {
     959      natural size = a->high - a->low;
     960     
     961      ProtectMemory(a->low, size);
     962    }
     963    a = a->succ;
     964    code = a->code;
     965  }
     966}
     967
     968void
     969unprotect_watched_areas()
     970{
     971  area *a = active_dynamic_area;
     972  natural code = a->code;
     973
     974  while (code != AREA_VOID) {
     975    if (code == AREA_WATCHED) {
     976      natural size = a->high - a->low;
     977     
     978      UnProtectMemory(a->low, size);
     979    }
     980    a = a->succ;
     981    code = a->code;
     982  }
     983}
Note: See TracChangeset for help on using the changeset viewer.