diff options
author | Neel Natu <neelnatu@google.com> | 2019-06-20 12:54:40 -0700 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2019-06-20 12:56:00 -0700 |
commit | 0b2135072d3a6b418f87f166b58dcf877f7c2fba (patch) | |
tree | 40c316afa59e5786fac24b7e8be940ae645ffb16 /test/syscalls/linux/mremap.cc | |
parent | b46ec3704b60bebdd63a597c62f3f471ee0d9be9 (diff) |
Implement madvise(MADV_DONTFORK)
PiperOrigin-RevId: 254253777
Diffstat (limited to 'test/syscalls/linux/mremap.cc')
-rw-r--r-- | test/syscalls/linux/mremap.cc | 11 |
1 files changed, 0 insertions, 11 deletions
diff --git a/test/syscalls/linux/mremap.cc b/test/syscalls/linux/mremap.cc index 7298d4ca8..64e435cb7 100644 --- a/test/syscalls/linux/mremap.cc +++ b/test/syscalls/linux/mremap.cc @@ -46,17 +46,6 @@ PosixErrorOr<void*> Mremap(void* old_address, size_t old_size, size_t new_size, return rv; } -// Returns true if the page containing addr is mapped. -bool IsMapped(uintptr_t addr) { - int const rv = msync(reinterpret_cast<void*>(addr & ~(kPageSize - 1)), - kPageSize, MS_ASYNC); - if (rv == 0) { - return true; - } - TEST_PCHECK_MSG(errno == ENOMEM, "msync failed with unexpected errno"); - return false; -} - // Fixture for mremap tests parameterized by mmap flags. using MremapParamTest = ::testing::TestWithParam<int>; |