Commit 38de91a5 authored by mic.besace's avatar mic.besace Committed by Commit bot

Solaris/OpenBSD/FreeBSD: [heap] Uncommit unused large object page memory.

Port d61a5c37

Original commit message:

    As a first step I uncommit the memory on the main thread. Also
    to measure impact and stability of that optimization. In a
    follow-up CL, the uncommitting should be moved on the concurrent thread.

R=jochen@chromium.org, hpayer@chromium.org
BUG=

Review-Url: https://codereview.chromium.org/2245703002
Cr-Commit-Position: refs/heads/master@{#38654}
parent f6875cee
......@@ -89,6 +89,7 @@ Matthew Sporleder <msporleder@gmail.com>
Maxim Mossienko <maxim.mossienko@gmail.com>
Michael Lutz <michi@icosahedron.de>
Michael Smith <mike@w3.org>
Michaël Zasso <mic.besace@gmail.com>
Mike Gilbert <floppymaster@gmail.com>
Mike Pennisi <mike@mikepennisi.com>
Milton Chiang <milton.chiang@mediatek.com>
......
......@@ -246,6 +246,10 @@ bool VirtualMemory::UncommitRegion(void* base, size_t size) {
kMmapFdOffset) != MAP_FAILED;
}
bool VirtualMemory::ReleasePartialRegion(void* base, size_t size,
void* free_start, size_t free_size) {
return munmap(free_start, free_size) == 0;
}
bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
return munmap(base, size) == 0;
......
......@@ -277,6 +277,10 @@ bool VirtualMemory::UncommitRegion(void* base, size_t size) {
kMmapFdOffset) != MAP_FAILED;
}
bool VirtualMemory::ReleasePartialRegion(void* base, size_t size,
void* free_start, size_t free_size) {
return munmap(free_start, free_size) == 0;
}
bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
return munmap(base, size) == 0;
......
......@@ -198,6 +198,10 @@ bool VirtualMemory::UncommitRegion(void* base, size_t size) {
kMmapFdOffset) != MAP_FAILED;
}
bool VirtualMemory::ReleasePartialRegion(void* base, size_t size,
void* free_start, size_t free_size) {
return munmap(free_start, free_size) == 0;
}
bool VirtualMemory::ReleaseRegion(void* base, size_t size) {
return munmap(base, size) == 0;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment