| 1 |
#ifndef _MALLOC_H |
| 2 |
#define _MALLOC_H |
| 3 |
|
| 4 |
#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ |
| 5 |
#else |
| 6 |
#include <__functions_malloc.h> |
| 7 |
#endif |
| 8 |
#ifdef __cplusplus |
| 9 |
extern "C" { |
| 10 |
#endif |
| 11 |
|
| 12 |
#define __NEED_size_t |
| 13 |
|
| 14 |
#include <bits/alltypes.h> |
| 15 |
|
| 16 |
#ifdef __wasilibc_unmodified_upstream /* Use alternate WASI libc headers */ |
| 17 |
void *malloc (size_t); |
| 18 |
void *calloc (size_t, size_t); |
| 19 |
void *realloc (void *, size_t); |
| 20 |
void free (void *); |
| 21 |
#endif |
| 22 |
#ifdef __wasilibc_unmodified_upstream /* WASI libc doesn't build the legacy functions */ |
| 23 |
void *valloc (size_t); |
| 24 |
void *memalign(size_t, size_t); |
| 25 |
#endif |
| 26 |
|
| 27 |
size_t malloc_usable_size(void *); |
| 28 |
|
| 29 |
#ifdef __cplusplus |
| 30 |
} |
| 31 |
#endif |
| 32 |
|
| 33 |
#endif |