Igor Kudrin | ace6572 | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 1 | //===------------------------- fallback_malloc.h --------------------------===// |
| 2 | // |
| 3 | // The LLVM Compiler Infrastructure |
| 4 | // |
| 5 | // This file is dual licensed under the MIT and the University of Illinois Open |
| 6 | // Source Licenses. See LICENSE.TXT for details. |
| 7 | // |
| 8 | //===----------------------------------------------------------------------===// |
| 9 | |
| 10 | #ifndef _FALLBACK_MALLOC_H |
| 11 | #define _FALLBACK_MALLOC_H |
| 12 | |
Shoaib Meenai | 54227ae | 2017-03-01 03:55:57 +0000 | [diff] [blame] | 13 | #include "__cxxabi_config.h" |
Igor Kudrin | ace6572 | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 14 | #include <cstddef> // for size_t |
| 15 | |
| 16 | namespace __cxxabiv1 { |
| 17 | |
Igor Kudrin | ace6572 | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 18 | // Allocate some memory from _somewhere_ |
Eric Fiselier | aad0594 | 2017-03-04 02:04:45 +0000 | [diff] [blame] | 19 | _LIBCXXABI_HIDDEN void * __aligned_malloc_with_fallback(size_t size); |
Igor Kudrin | ace6572 | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 20 | |
| 21 | // Allocate and zero-initialize memory from _somewhere_ |
Shoaib Meenai | 54227ae | 2017-03-01 03:55:57 +0000 | [diff] [blame] | 22 | _LIBCXXABI_HIDDEN void * __calloc_with_fallback(size_t count, size_t size); |
Igor Kudrin | ace6572 | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 23 | |
Eric Fiselier | aad0594 | 2017-03-04 02:04:45 +0000 | [diff] [blame] | 24 | _LIBCXXABI_HIDDEN void __aligned_free_with_fallback(void *ptr); |
Shoaib Meenai | 54227ae | 2017-03-01 03:55:57 +0000 | [diff] [blame] | 25 | _LIBCXXABI_HIDDEN void __free_with_fallback(void *ptr); |
Igor Kudrin | ace6572 | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 26 | |
| 27 | } // namespace __cxxabiv1 |
| 28 | |
| 29 | #endif |