wasi-libc/basics/include/__functions_malloc.h
Dan Gohman 320054e84f WASI libc prototype implementation.
This incoporates pieces from musl-libc, cloudlibc, cloudabi, libpreopen,
and dlmalloc, as well as a significant amount of new code.
2019-03-27 07:59:55 -07:00

23 lines
509 B
C

#ifndef __wasm___functions_malloc_h
#define __wasm___functions_malloc_h
#define __need_size_t
#define __need_wchar_t
#define __need_NULL
#include <stddef.h>
#ifdef __cplusplus
extern "C" {
#endif
void *malloc(size_t size) __attribute__((__malloc__, __warn_unused_result__));
void free(void *ptr);
void *calloc(size_t nmemb, size_t size) __attribute__((__malloc__, __warn_unused_result__));
void *realloc(void *ptr, size_t size) __attribute__((__warn_unused_result__));
#ifdef __cplusplus
}
#endif
#endif