master
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
9extern "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 */
17void *malloc (size_t);
18void *calloc (size_t, size_t);
19void *realloc (void *, size_t);
20void free (void *);
21#endif
22#ifdef __wasilibc_unmodified_upstream /* WASI libc doesn't build the legacy functions */
23void *valloc (size_t);
24void *memalign(size_t, size_t);
25#endif
26
27size_t malloc_usable_size(void *);
28
29#ifdef __cplusplus
30}
31#endif
32
33#endif