]> git.ipfire.org Git - thirdparty/gcc.git/blame - libsanitizer/sanitizer_common/sanitizer_allocator_interface.h
Fix formatting in rs6000.c.
[thirdparty/gcc.git] / libsanitizer / sanitizer_common / sanitizer_allocator_interface.h
CommitLineData
866e32ad
KS
1//===-- sanitizer_allocator_interface.h ------------------------- C++ -----===//
2//
b667dd70
ML
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
866e32ad
KS
6//
7//===----------------------------------------------------------------------===//
8//
9// Re-declaration of functions from public sanitizer allocator interface.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef SANITIZER_ALLOCATOR_INTERFACE_H
14#define SANITIZER_ALLOCATOR_INTERFACE_H
15
16#include "sanitizer_internal_defs.h"
17
18using __sanitizer::uptr;
19
20extern "C" {
21SANITIZER_INTERFACE_ATTRIBUTE
22uptr __sanitizer_get_estimated_allocated_size(uptr size);
23SANITIZER_INTERFACE_ATTRIBUTE int __sanitizer_get_ownership(const void *p);
24SANITIZER_INTERFACE_ATTRIBUTE uptr
25__sanitizer_get_allocated_size(const void *p);
26SANITIZER_INTERFACE_ATTRIBUTE uptr __sanitizer_get_current_allocated_bytes();
27SANITIZER_INTERFACE_ATTRIBUTE uptr __sanitizer_get_heap_size();
28SANITIZER_INTERFACE_ATTRIBUTE uptr __sanitizer_get_free_bytes();
29SANITIZER_INTERFACE_ATTRIBUTE uptr __sanitizer_get_unmapped_bytes();
30
10189819
MO
31SANITIZER_INTERFACE_ATTRIBUTE int __sanitizer_install_malloc_and_free_hooks(
32 void (*malloc_hook)(const void *, uptr),
33 void (*free_hook)(const void *));
34
866e32ad 35SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
5d3805fc 36 void __sanitizer_malloc_hook(void *ptr, uptr size);
866e32ad 37SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
5d3805fc 38 void __sanitizer_free_hook(void *ptr);
10189819 39
eac97531
ML
40SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE void
41__sanitizer_purge_allocator();
42
5d3805fc
JJ
43SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE void
44__sanitizer_print_memory_profile(uptr top_percent, uptr max_number_of_contexts);
866e32ad
KS
45} // extern "C"
46
47#endif // SANITIZER_ALLOCATOR_INTERFACE_H