Bug 963983 - posix_madvise() should be used instead of madvise() on Solaris. r=jandem

This commit is contained in:
Petr Sumbera 2017-05-22 04:16:12 -07:00
parent eb27aad2c1
commit 4924c09590

View File

@ -766,7 +766,11 @@ MarkPagesUnused(void* p, size_t size)
return false;
MOZ_ASSERT(OffsetFromAligned(p, pageSize) == 0);
#if defined(XP_SOLARIS)
int result = posix_madvise(p, size, POSIX_MADV_DONTNEED);
#else
int result = madvise(p, size, MADV_DONTNEED);
#endif
return result != -1;
}