1 //===-- report_linux.h ------------------------------------------*- 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 //===----------------------------------------------------------------------===//
9 #ifndef SCUDO_REPORT_LINUX_H_
10 #define SCUDO_REPORT_LINUX_H_
14 #if SCUDO_LINUX || SCUDO_TRUSTY
16 #include "internal_defs.h"
20 // Report a fatal error when a map call fails. SizeIfOOM shall
21 // hold the requested size on an out-of-memory error, 0 otherwise.
22 void NORETURN
reportMapError(uptr SizeIfOOM
= 0);
24 // Report a fatal error when an unmap call fails.
25 void NORETURN
reportUnmapError(uptr Addr
, uptr Size
);
27 // Report a fatal error when a mprotect call fails.
28 void NORETURN
reportProtectError(uptr Addr
, uptr Size
, int Prot
);
32 #endif // SCUDO_LINUX || SCUDO_TRUSTY
34 #endif // SCUDO_REPORT_LINUX_H_