]>
Commit | Line | Data |
---|---|---|
4646d29a DG |
1 | #ifndef __wasm_basics___functions_malloc_h |
2 | #define __wasm_basics___functions_malloc_h | |
320054e8 DG |
3 | |
4 | #define __need_size_t | |
5 | #define __need_wchar_t | |
6 | #define __need_NULL | |
7 | #include <stddef.h> | |
8 | ||
9 | #ifdef __cplusplus | |
10 | extern "C" { | |
11 | #endif | |
12 | ||
13 | void *malloc(size_t size) __attribute__((__malloc__, __warn_unused_result__)); | |
14 | void free(void *ptr); | |
15 | void *calloc(size_t nmemb, size_t size) __attribute__((__malloc__, __warn_unused_result__)); | |
16 | void *realloc(void *ptr, size_t size) __attribute__((__warn_unused_result__)); | |
17 | ||
ad03c82d DG |
18 | #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE) |
19 | void *reallocarray(void *, size_t, size_t) __attribute__((__warn_unused_result__)); | |
20 | #endif | |
21 | ||
320054e8 DG |
22 | #ifdef __cplusplus |
23 | } | |
24 | #endif | |
25 | ||
26 | #endif |