diff options
Diffstat (limited to 'lib/sanitizer_common/sanitizer_fuchsia.cc')
-rw-r--r-- | lib/sanitizer_common/sanitizer_fuchsia.cc | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/sanitizer_common/sanitizer_fuchsia.cc b/lib/sanitizer_common/sanitizer_fuchsia.cc index 00a8aabbf..21fabddb1 100644 --- a/lib/sanitizer_common/sanitizer_fuchsia.cc +++ b/lib/sanitizer_common/sanitizer_fuchsia.cc @@ -236,37 +236,6 @@ void *MmapOrDieOnFatalError(uptr size, const char *mem_type) { return DoAnonymousMmapOrDie(size, mem_type, false, false); } -uptr ReservedAddressRange::Init(uptr init_size, const char* name = nullptr, - uptr fixed_addr = uptr(0)) { - base_ = MmapNoAccess(init_size); - size_ = size; - name_ = name; - return reinterpret_cast<uptr>(base_); -} - -// Uses fixed_addr for now. -// Will use offset instead once we've implemented this function for real. -uptr ReservedAddressRange::Map(uptr fixed_addr, uptr map_size, - bool tolerate_enomem = true) { - return reinterpret_cast<uptr>(MmapFixedOrDie(fixed_addr, size, - tolerate_enomem)); -} - -void ReservedAddressRange::Unmap(uptr addr, uptr size) { - void* addr_as_void = reinterpret_cast<void*>(addr); - uptr base_as_uptr = reinterpret_cast<uptr>(base_); - // Only unmap at the beginning or end of the range. - CHECK_EQ((addr_as_void == base_) || (addr + size == base_as_uptr + size_), - true); - // Detect overflows. - CHECK_LE(size, (base_as_uptr + size_) - addr); - UnmapOrDie(reinterpret_cast<void*>(addr), size); - if (addr_as_void == base_) { - base_ = reinterpret_cast<void*>(addr + size); - } - size_ = size_ - size; -} - // MmapNoAccess and MmapFixedOrDie are used only by sanitizer_allocator. // Instead of doing exactly what they say, we make MmapNoAccess actually // just allocate a VMAR to reserve the address space. Then MmapFixedOrDie |