Skip to content
This repository has been archived by the owner on Aug 4, 2022. It is now read-only.

Commit

Permalink
Bug 1158445 - posix_madvise() should be used instead of madvise in Po…
Browse files Browse the repository at this point in the history
…ison code; r=froydnj
  • Loading branch information
psumbera committed Jun 7, 2017
1 parent ea4dd2f commit e55c9d9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion mfbt/Poison.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ ReleaseRegion(void* aRegion, uintptr_t aSize)
static bool
ProbeRegion(uintptr_t aRegion, uintptr_t aSize)
{
if (madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) {
if (posix_madvise(reinterpret_cast<void*>(aRegion), aSize, POSIX_MADV_NORMAL)) {
return true;
} else {
return false;
Expand Down
2 changes: 1 addition & 1 deletion mfbt/tests/TestPoisonArea.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ ReleaseRegion(void* aPage)
static bool
ProbeRegion(uintptr_t aPage)
{
return !!madvise(reinterpret_cast<void*>(aPage), PageSize(), MADV_NORMAL);
return !!posix_madvise(reinterpret_cast<void*>(aPage), PageSize(), POSIX_MADV_NORMAL);
}

static int
Expand Down

0 comments on commit e55c9d9

Please sign in to comment.