blob: d6f471483a2043b6c37568a67b8ca7542e030437 [file] [log] [blame]
Igor Kudrinace65722016-10-07 08:48:28 +00001//===------------------------- 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 Meenai54227ae2017-03-01 03:55:57 +000013#include "__cxxabi_config.h"
Igor Kudrinace65722016-10-07 08:48:28 +000014#include <cstddef> // for size_t
15
16namespace __cxxabiv1 {
17
Igor Kudrinace65722016-10-07 08:48:28 +000018// Allocate some memory from _somewhere_
Eric Fiselieraad05942017-03-04 02:04:45 +000019_LIBCXXABI_HIDDEN void * __aligned_malloc_with_fallback(size_t size);
Igor Kudrinace65722016-10-07 08:48:28 +000020
21// Allocate and zero-initialize memory from _somewhere_
Shoaib Meenai54227ae2017-03-01 03:55:57 +000022_LIBCXXABI_HIDDEN void * __calloc_with_fallback(size_t count, size_t size);
Igor Kudrinace65722016-10-07 08:48:28 +000023
Eric Fiselieraad05942017-03-04 02:04:45 +000024_LIBCXXABI_HIDDEN void __aligned_free_with_fallback(void *ptr);
Shoaib Meenai54227ae2017-03-01 03:55:57 +000025_LIBCXXABI_HIDDEN void __free_with_fallback(void *ptr);
Igor Kudrinace65722016-10-07 08:48:28 +000026
27} // namespace __cxxabiv1
28
29#endif