Igor Kudrin | 11741ce | 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 | a992117 | 2017-03-01 03:55:57 +0000 | [diff] [blame] | 13 | #include "__cxxabi_config.h" |
Igor Kudrin | 11741ce | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 14 | #include <cstddef> // for size_t |
| 15 | |
| 16 | namespace __cxxabiv1 { |
| 17 | |
Igor Kudrin | 11741ce | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 18 | // Allocate some memory from _somewhere_ |
Shoaib Meenai | a992117 | 2017-03-01 03:55:57 +0000 | [diff] [blame] | 19 | _LIBCXXABI_HIDDEN void * __malloc_with_fallback(size_t size); |
Igor Kudrin | 11741ce | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 20 | |
| 21 | // Allocate and zero-initialize memory from _somewhere_ |
Shoaib Meenai | a992117 | 2017-03-01 03:55:57 +0000 | [diff] [blame] | 22 | _LIBCXXABI_HIDDEN void * __calloc_with_fallback(size_t count, size_t size); |
Igor Kudrin | 11741ce | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 23 | |
Shoaib Meenai | a992117 | 2017-03-01 03:55:57 +0000 | [diff] [blame] | 24 | _LIBCXXABI_HIDDEN void __free_with_fallback(void *ptr); |
Igor Kudrin | 11741ce | 2016-10-07 08:48:28 +0000 | [diff] [blame] | 25 | |
| 26 | } // namespace __cxxabiv1 |
| 27 | |
| 28 | #endif |