From 56d2067885ea1c00986b0c91acb18aae7ef9ceec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Wed, 23 Oct 2002 15:51:19 +0000 Subject: [PATCH] Added a simple malloc.h - doesn't contain all the rare BeOS stuff, though. git-svn-id: file:///srv/svn/repos/haiku/trunk/current@1620 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- headers/posix/malloc.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 headers/posix/malloc.h diff --git a/headers/posix/malloc.h b/headers/posix/malloc.h new file mode 100644 index 0000000000..a7fe5f8c76 --- /dev/null +++ b/headers/posix/malloc.h @@ -0,0 +1,36 @@ +#ifndef _MALLOC_H +#define _MALLOC_H +/* +** Distributed under the terms of the OpenBeOS License. +*/ + +#include + + +// ToDo: there are some BeOS specific things missing, most +// things are only rarely or almost never used, though. +// The more important missing functionality *and* prototypes +// are mcheck(), mstats(), and malloc_find_object_address(). +// +// Also, MALLOC_DEBUG is currently not yet supported. +// +// If you want to implement it, have a look at the BeOS header +// file malloc.h located in /boot/develop/headers/posix. + + +#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); +extern void *memalign(size_t alignment, size_t numBytes); +extern void *valloc(size_t numBytes); + +#ifdef __cplusplus +} +#endif + +#endif /* _MALLOC_H */