home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
INCLUDE
/
MALLOC.H
< prev
next >
Wrap
Text File
|
1993-09-17
|
4KB
|
111 lines
#pragma info( none )
#ifndef __CHKHDR__
#pragma info( none )
#endif
#pragma info( restore )
#if ( !defined(__malloc_h) && !defined(__stdlib_h) )
#define __malloc_h
#ifdef __cplusplus
extern "C" {
#endif
/********************************************************************/
/* <malloc.h> header file */
/* */
/* Licensed Materials - Property of IBM */
/* */
/* IBM C/C++ Tools Version 2.01 */
/* Copyright (C) International Business Machines Corp., 1991,1993 */
/* 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);
size_t _Optlink _msize(void *);
#if (defined(__DEBUG_ALLOC__) && !defined(__TILED__))
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 )
#else
#define _heap_check( )
#define _dump_allocated( x )
#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 map( calloc , "_tcalloc" )
#pragma map( free , "_tfree" )
#pragma map( malloc , "_tmalloc" )
#pragma map( realloc, "_trealloc" )
#endif
#endif
#ifdef __cplusplus
}
#endif
#endif
#pragma info( none )
#ifndef __CHKHDR__
#pragma info( restore )
#endif
#pragma info( restore )