* c-parser.c (c_parser_omp_requires): Call sorry_at on requires
[official-gcc.git] / libsanitizer / sanitizer_common / sanitizer_mac_libcdep.cc
bloba0d5c3f8f551dc3ac42d598f5687e5cb213f5e82
1 //===-- sanitizer_mac_libcdep.cc ------------------------------------------===//
2 //
3 // This file is distributed under the University of Illinois Open Source
4 // License. See LICENSE.TXT for details.
5 //
6 //===----------------------------------------------------------------------===//
7 //
8 // This file is shared between various sanitizers' runtime libraries and
9 // implements OSX-specific functions.
10 //===----------------------------------------------------------------------===//
12 #include "sanitizer_platform.h"
13 #if SANITIZER_MAC
14 #include "sanitizer_mac.h"
16 #include <sys/mman.h>
18 namespace __sanitizer {
20 void RestrictMemoryToMaxAddress(uptr max_address) {
21 uptr size_to_mmap = GetMaxUserVirtualAddress() + 1 - max_address;
22 void *res = MmapFixedNoAccess(max_address, size_to_mmap, "high gap");
23 CHECK(res != MAP_FAILED);
26 } // namespace __sanitizer
28 #endif // SANITIZER_MAC