Changeset 13954


Ignore:
Timestamp:
Jul 12, 2010, 12:10:49 PM (9 years ago)
Author:
gb
Message:

In commit_pages(), try to ensure that we return false if CommitMemory?() does.
In gc(), zero_pages() after possibly shrinking heap.

Location:
trunk/source/lisp-kernel
Files:
2 edited

Legend:

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

    r13352 r13954  
    13651365    pkg = 0,
    13661366    itabvec = 0;
    1367   BytePtr oldfree = a->active;
     1367  BytePtr oldfree = a->active, last_zeroed_addr;
    13681368  TCR *other_tcr;
    13691369  natural static_dnodes;
     
    16781678    }
    16791679
    1680     zero_memory_range(a->active, oldfree);
    16811680
    16821681    resize_dynamic_heap(a->active,
    16831682                        (GCephemeral_low == 0) ? lisp_heap_gc_threshold : 0);
     1683
     1684    if (oldfree < a->high) {
     1685      last_zeroed_addr = oldfree;
     1686    } else {
     1687      last_zeroed_addr = a->high;
     1688    }
     1689    zero_memory_range(a->active, last_zeroed_addr);
    16841690
    16851691    /*
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r13895 r13954  
    448448{
    449449  if (len != 0) {
    450     if (CommitMemory(start, len)) {
    451       if (touch_all_pages(start, len)) {
    452         return true;
    453       }
     450    if (!CommitMemory(start, len)) {
     451      return false;
     452    }
     453    if (!touch_all_pages(start, len)) {
     454      return false;
    454455    }
    455456  }
Note: See TracChangeset for help on using the changeset viewer.