mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
Bug 963983 - posix_madvise() should be used instead of madvise() on Solaris. r=jandem
This commit is contained in:
parent
eb27aad2c1
commit
4924c09590
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user