mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 21:01:08 +00:00
Bug 1158445 - posix_madvise() should be used instead of madvise on Solaris. r=froydnj, r=jandem
This commit is contained in:
parent
b3ab3e52a0
commit
80944c40d8
@ -129,7 +129,11 @@ ReleaseRegion(void* aRegion, uintptr_t aSize)
|
||||
static bool
|
||||
ProbeRegion(uintptr_t aRegion, uintptr_t aSize)
|
||||
{
|
||||
#ifdef XP_SOLARIS
|
||||
if (posix_madvise(reinterpret_cast<void*>(aRegion), aSize, POSIX_MADV_NORMAL)) {
|
||||
#else
|
||||
if (madvise(reinterpret_cast<void*>(aRegion), aSize, MADV_NORMAL)) {
|
||||
#endif
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
@ -269,7 +269,11 @@ ReleaseRegion(void* aPage)
|
||||
static bool
|
||||
ProbeRegion(uintptr_t aPage)
|
||||
{
|
||||
#ifdef XP_SOLARIS
|
||||
return !!posix_madvise(reinterpret_cast<void*>(aPage), PageSize(), POSIX_MADV_NORMAL);
|
||||
#else
|
||||
return !!madvise(reinterpret_cast<void*>(aPage), PageSize(), MADV_NORMAL);
|
||||
#endif
|
||||
}
|
||||
|
||||
static int
|
||||
|
Loading…
Reference in New Issue
Block a user