1 //===-- common.cc -----------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
10 #include "atomic_helpers.h"
17 uptr getPageSizeSlow() {
18 PageSizeCached = getPageSize();
19 CHECK_NE(PageSizeCached, 0);
20 return PageSizeCached;
23 // Fatal internal map() or unmap() error (potentially OOM related).
24 void NORETURN dieOnMapUnmapError(bool OutOfMemory) {
25 outputRaw("Scudo ERROR: internal map or unmap failure");