1 #ifndef _MALLOC_H 2 #define _MALLOC_H 3 /* 4 ** Distributed under the terms of the OpenBeOS License. 5 */ 6 7 #include <unistd.h> 8 9 // ToDo: there are some BeOS specific things missing, most 10 // things are only rarely or almost never used, though. 11 // The more important missing functionality *and* prototypes 12 // are mcheck(), mstats(), and malloc_find_object_address(). 13 // 14 // Also, MALLOC_DEBUG is currently not yet supported. 15 // 16 // If you want to implement it, have a look at the BeOS header 17 // file malloc.h located in /boot/develop/headers/posix. 18 19 20 #ifdef __cplusplus 21 extern "C" { 22 #endif 23 24 extern void *malloc(size_t numBytes); 25 extern void *realloc(void *oldPointer, size_t newSize); 26 extern void *calloc(size_t numElements, size_t size); 27 extern void free(void *pointer); 28 extern void *memalign(size_t alignment, size_t numBytes); 29 extern void *valloc(size_t numBytes); 30 31 #ifdef __cplusplus 32 } 33 #endif 34 35 #endif /* _MALLOC_H */ 36