base/allocator: Avoid calling memset() on macOS in DecommitSystemPages()
To have uniform semantics across OSes, we call memset() in DecommitSystemPages() on macOS. This is costly and potentially wasteful, as this may bring back compressed/swpped out pages from disk, just to call memset(). To avoid that, call mmap() on top of the existing mapping. Bug: 1086388 Change-Id: Iedbf8d1b5d9882cc5e229765b80f95e9ee12a8de Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2238118Reviewed-by:Kentaro Hara <haraken@chromium.org> Reviewed-by:
Takashi Sakamoto <tasak@google.com> Reviewed-by:
Bartek Nowierski <bartekn@chromium.org> Commit-Queue: Benoit L <lizeb@chromium.org> Cr-Commit-Position: refs/heads/master@{#781898}
Showing
Please register or sign in to comment