Unverified Commit e15fcd7b authored by Christopher Ferris's avatar Christopher Ferris Committed by GitHub
Browse files

[scudo] Use the releaseAndZeroPagesToOS function. (#71256)

All of the code assumes that when the pages are released, the entry is
zero'd, so use the correct function. On most systems, this does not
change anything.
parent f4df0c48
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -223,7 +223,7 @@ public:
                                         MAP_NOACCESS);
      }
    } else if (Interval == 0) {
      Entry.MemMap.releasePagesToOS(Entry.CommitBase, Entry.CommitSize);
      Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
      Entry.Time = 0;
    }
    do {
@@ -441,7 +441,7 @@ private:
        OldestTime = Entry.Time;
      return;
    }
    Entry.MemMap.releasePagesToOS(Entry.CommitBase, Entry.CommitSize);
    Entry.MemMap.releaseAndZeroPagesToOS(Entry.CommitBase, Entry.CommitSize);
    Entry.Time = 0;
  }