mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-30 16:22:00 +00:00
Bug 1682947 - Use MADV_FREE_REUSE before using decommitted memory again on OSX, as per https://bugs.chromium.org/p/chromium/issues/detail?id=823915 r=glandium
Differential Revision: https://phabricator.services.mozilla.com/D99932
This commit is contained in:
parent
63c64ed972
commit
410cb65d7a
@ -811,6 +811,11 @@ bool MarkPagesUnusedHard(void* region, size_t length) {
|
||||
void MarkPagesInUseSoft(void* region, size_t length) {
|
||||
CheckDecommit(region, length);
|
||||
|
||||
#if defined(XP_DARWIN)
|
||||
while (madvise(region, length, MADV_FREE_REUSE) == -1 && errno == EAGAIN) {
|
||||
}
|
||||
#endif
|
||||
|
||||
MOZ_MAKE_MEM_UNDEFINED(region, length);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user