mirror of
https://review.haiku-os.org/buildtools
synced 2026-02-04 07:53:14 +01:00
Updated dependencies: * GMP 6.2.1 * ISL 0.24 * MPL 1.2.1 * MPFR 4.1.0 The dependencies were pulled in by running the ./contrib/download_prerequisites script and then manually removing the symbolic links and archives, and renaming the directories (i.e mv isl-0.24 to isl)
30 lines
972 B
C++
30 lines
972 B
C++
//===-- sanitizer_mac_libcdep.cpp -----------------------------------------===//
|
|
//
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
// This file is shared between various sanitizers' runtime libraries and
|
|
// implements OSX-specific functions.
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
#include "sanitizer_platform.h"
|
|
#if SANITIZER_APPLE
|
|
#include "sanitizer_mac.h"
|
|
|
|
#include <sys/mman.h>
|
|
|
|
namespace __sanitizer {
|
|
|
|
void RestrictMemoryToMaxAddress(uptr max_address) {
|
|
uptr size_to_mmap = GetMaxUserVirtualAddress() + 1 - max_address;
|
|
void *res = MmapFixedNoAccess(max_address, size_to_mmap, "high gap");
|
|
CHECK(res != MAP_FAILED);
|
|
}
|
|
|
|
} // namespace __sanitizer
|
|
|
|
#endif // SANITIZER_APPLE
|