xref: /aosp_15_r20/external/libcxxabi/src/fallback_malloc.h (revision c05d8e5dc3e10f6ce4317e8bc22cc4a25f55fa94)
1*c05d8e5dSAndroid Build Coastguard Worker //===------------------------- fallback_malloc.h --------------------------===//
2*c05d8e5dSAndroid Build Coastguard Worker //
3*c05d8e5dSAndroid Build Coastguard Worker //                     The LLVM Compiler Infrastructure
4*c05d8e5dSAndroid Build Coastguard Worker //
5*c05d8e5dSAndroid Build Coastguard Worker // This file is dual licensed under the MIT and the University of Illinois Open
6*c05d8e5dSAndroid Build Coastguard Worker // Source Licenses. See LICENSE.TXT for details.
7*c05d8e5dSAndroid Build Coastguard Worker //
8*c05d8e5dSAndroid Build Coastguard Worker //===----------------------------------------------------------------------===//
9*c05d8e5dSAndroid Build Coastguard Worker 
10*c05d8e5dSAndroid Build Coastguard Worker #ifndef _FALLBACK_MALLOC_H
11*c05d8e5dSAndroid Build Coastguard Worker #define _FALLBACK_MALLOC_H
12*c05d8e5dSAndroid Build Coastguard Worker 
13*c05d8e5dSAndroid Build Coastguard Worker #include "__cxxabi_config.h"
14*c05d8e5dSAndroid Build Coastguard Worker #include <cstddef> // for size_t
15*c05d8e5dSAndroid Build Coastguard Worker 
16*c05d8e5dSAndroid Build Coastguard Worker namespace __cxxabiv1 {
17*c05d8e5dSAndroid Build Coastguard Worker 
18*c05d8e5dSAndroid Build Coastguard Worker // Allocate some memory from _somewhere_
19*c05d8e5dSAndroid Build Coastguard Worker _LIBCXXABI_HIDDEN void * __aligned_malloc_with_fallback(size_t size);
20*c05d8e5dSAndroid Build Coastguard Worker 
21*c05d8e5dSAndroid Build Coastguard Worker // Allocate and zero-initialize memory from _somewhere_
22*c05d8e5dSAndroid Build Coastguard Worker _LIBCXXABI_HIDDEN void * __calloc_with_fallback(size_t count, size_t size);
23*c05d8e5dSAndroid Build Coastguard Worker 
24*c05d8e5dSAndroid Build Coastguard Worker _LIBCXXABI_HIDDEN void __aligned_free_with_fallback(void *ptr);
25*c05d8e5dSAndroid Build Coastguard Worker _LIBCXXABI_HIDDEN void __free_with_fallback(void *ptr);
26*c05d8e5dSAndroid Build Coastguard Worker 
27*c05d8e5dSAndroid Build Coastguard Worker } // namespace __cxxabiv1
28*c05d8e5dSAndroid Build Coastguard Worker 
29*c05d8e5dSAndroid Build Coastguard Worker #endif
30