2006-03-15 02:15:57 +03:00
|
|
|
/*
|
2021-10-01 00:18:12 +03:00
|
|
|
* Copyright 2002-2021 Haiku, Inc. All Rights Reserved.
|
2006-03-15 02:15:57 +03:00
|
|
|
* Distributed under the terms of the MIT License.
|
|
|
|
*/
|
2002-10-23 19:51:19 +04:00
|
|
|
#ifndef _MALLOC_H
|
|
|
|
#define _MALLOC_H
|
|
|
|
|
|
|
|
|
2012-07-19 22:11:40 +04:00
|
|
|
#include <unistd.h>
|
2002-10-23 19:51:19 +04:00
|
|
|
|
|
|
|
|
|
|
|
#ifdef __cplusplus
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
extern void *malloc(size_t numBytes);
|
|
|
|
extern void *realloc(void *oldPointer, size_t newSize);
|
|
|
|
extern void *calloc(size_t numElements, size_t size);
|
|
|
|
extern void free(void *pointer);
|
2021-10-01 00:18:12 +03:00
|
|
|
extern void *memalign(size_t alignment, size_t numBytes) _ALIGNED_BY_ARG(1);
|
2002-10-23 19:51:19 +04:00
|
|
|
extern void *valloc(size_t numBytes);
|
|
|
|
|
2015-06-13 15:25:35 +03:00
|
|
|
#ifdef _GNU_SOURCE
|
|
|
|
size_t malloc_usable_size(void *ptr);
|
|
|
|
#endif
|
|
|
|
|
2002-10-23 19:51:19 +04:00
|
|
|
#ifdef __cplusplus
|
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _MALLOC_H */
|