gcc/libobjc/objc/deprecated/objc_malloc.h
Nicola Pero d1be5d82e0 In libobjc/:
* objc/deprecated/objc_malloc.h: New file.
        * objc/deprecated/objc_valloc.h: New file.
        * objc/objc-api.h: Include the files instead of defining
        objc_valloc, _objc_malloc() and similar.
        * Makefile.in (OBJC_DEPRECATED_H): Added objc_valloc.h and
        objc_malloc.h.
        * memory.c: Removed the extra layer of indirection of _objc_malloc
        and similar.
        (objc_calloc): Use GC_malloc in the garbage-collected
        implementation as GC_malloc returns memory that is already freed.
        (objc_valloc): Deprecated.

From-SVN: r164224
2010-09-12 01:44:58 +00:00

18 lines
690 B
C

/*
** Hook functions for memory allocation and disposal.
** This makes it easy to substitute garbage collection systems
** such as Boehm's GC by assigning these function pointers
** to the GC's allocation routines. By default these point
** to the ANSI standard malloc, realloc, free, etc.
**
** Users should call the normal objc routines above for
** memory allocation and disposal within their programs.
*/
objc_EXPORT void *(*_objc_malloc)(size_t);
objc_EXPORT void *(*_objc_atomic_malloc)(size_t);
objc_EXPORT void *(*_objc_valloc)(size_t);
objc_EXPORT void *(*_objc_realloc)(void *, size_t);
objc_EXPORT void *(*_objc_calloc)(size_t, size_t);
objc_EXPORT void (*_objc_free)(void *);