1/*
2 * Copyright 2002-2021 Haiku, Inc. All Rights Reserved.
3 * Distributed under the terms of the MIT License.
4 */
5#ifndef _MALLOC_H
6#define _MALLOC_H
7
8
9#include <unistd.h>
10
11
12#ifdef __cplusplus
13extern "C" {
14#endif
15
16extern void *malloc(size_t numBytes);
17extern void *realloc(void *oldPointer, size_t newSize);
18extern void *calloc(size_t numElements, size_t size);
19extern void free(void *pointer);
20extern void *memalign(size_t alignment, size_t numBytes) _ALIGNED_BY_ARG(1);
21extern void *valloc(size_t numBytes);
22
23#ifdef _GNU_SOURCE
24size_t malloc_usable_size(void *ptr);
25#endif
26
27#ifdef __cplusplus
28}
29#endif
30
31#endif /* _MALLOC_H */
32