Commit 039c4531 authored by Paul Bone's avatar Paul Bone
Browse files

Bug 1822451 - Don't include PHC guard pages in explicit memory r=decoder

parent c7acbaf0
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -1410,9 +1410,11 @@ void replace_jemalloc_stats(jemalloc_stats_t* aStats,
  }
  aStats->allocated += allocated;

  // Waste is the gap between `allocated` and `mapped`.
  size_t waste = mapped - allocated;
  aStats->waste += waste;
  // guards is the gap between `allocated` and `mapped`. In some ways this
  // almost fits into aStats->wasted since it feels like wasted memory. However
  // wasted should only include committed memory and these guard pages are
  // uncommitted. Therefore we don't include it anywhere.
  // size_t guards = mapped - allocated;

  // aStats.page_cache and aStats.bin_unused are left unchanged because PHC
  // doesn't have anything corresponding to those.