home *** CD-ROM | disk | FTP | other *** search
- #if ( !defined(__malloc_h) && !defined(__stdlib_h) )
- #define __malloc_h
-
- #pragma info( none )
- #ifndef __CHKHDR__
- #pragma info( none )
- #endif
- #pragma info( restore )
-
- #ifdef __cplusplus
- extern "C" {
- #endif
-
- /********************************************************************/
- /* <malloc.h> header file */
- /* */
- /* Licensed Materials - Property of IBM */
- /* */
- /* IBM C Set/2 Beta Version */
- /* Copyright (C) International Business Machines Corp., 1991,1992 */
- /* All rights reserved */
- /* */
- /* US Government Users Restricted Rights - */
- /* Use, duplication, or disclosure restricted */
- /* by GSA ADP Schedule Contract with IBM Corp. */
- /* */
- /********************************************************************/
-
- #if defined(__EXTENDED__)
-
- #ifndef __size_t
- #define __size_t
- typedef unsigned int size_t;
- #endif
-
- /* Define different memory model versions of memory management routines */
- /* to the standard names. */
-
- #define _ncalloc( x, y ) calloc( (x), (y) )
- #define _fcalloc( x, y ) calloc( (x), (y) )
- #define _nfree( x ) free( (x) )
- #define _ffree( x ) free( (x) )
- #define _nmalloc( x ) malloc( (x) )
- #define _fmalloc( x ) malloc( (x) )
- #define _nrealloc( x, y ) realloc( (x), (y) )
- #define _frealloc( x, y ) realloc( (x), (y) )
- #define _fheapmin( ) _heapmin( )
- #define _nheapmin( ) _heapmin( )
-
- /* function prototypes */
-
- #ifndef _alloca
- void * _Builtin __alloca( size_t );
- #pragma info( none )
- #define _alloca( x ) __alloca( (x) )
- #define alloca( x ) __alloca( (x) )
- #pragma info( restore )
- #endif
-
- void * _Optlink calloc( size_t, size_t );
- void _Optlink free( void * );
- void * _Optlink malloc( size_t );
- void * _Optlink realloc( void *, size_t );
- int _Optlink _heapmin(void);
- #ifdef __DEBUG_ALLOC__
- void * _Optlink _debug_calloc( size_t, size_t, const char *, size_t );
- void _Optlink _debug_free( void *, const char *, size_t );
- void * _Optlink _debug_malloc( size_t, const char *, size_t );
- void * _Optlink _debug_realloc( void *, size_t, const char *, size_t );
- int _Optlink _debug_heapmin( const char *, size_t );
- void _Optlink _heap_check( void );
- void _Optlink _dump_allocated( int );
- #pragma info( none )
- #define calloc( x, y ) _debug_calloc( (x), (y), __FILE__, __LINE__ )
- #define free( x ) _debug_free( (x), __FILE__, __LINE__ )
- #define malloc( x ) _debug_malloc( (x), __FILE__, __LINE__ )
- #define realloc( x, y ) _debug_realloc( (x), (y), __FILE__, __LINE__ )
- #define _heapmin( ) _debug_heapmin( __FILE__, __LINE__ )
- #pragma info( restore )
-
- #endif
-
- #ifdef __TILED__
- void * _Optlink _tcalloc( size_t, size_t );
- void _Optlink _tfree( void * );
- void * _Optlink _tmalloc( size_t );
- void * _Optlink _trealloc( void *, size_t );
- #pragma info( none )
- #define calloc( x, y ) _tcalloc( (x), (y) )
- #define free( x ) _tfree( (x) )
- #define malloc( x ) _tmalloc( (x) )
- #define realloc( x, y ) _trealloc( (x), (y) )
- #pragma info( restore )
- #endif
-
- #endif
-
- #ifdef __cplusplus
- }
- #endif
-
- #pragma info( none )
- #ifndef __CHKHDR__
- #pragma info( restore )
- #endif
- #pragma info( restore )
-
- #endif
-