|
|
|
|
PM_useLocalMalloc
Use local memory allocation routines.
Declaration
void PMAPI PM_useLocalMalloc(
void * (*malloc)(size_t size),
void * (*calloc)(size_t nelem,size_t size),
void * (*realloc)(void *ptr,size_t size),
void (*free)(void *p))
Prototype In
pmapi.h
Parameters
malloc |
Pointer to new malloc routine to use |
calloc |
Pointer to new caalloc routine to use |
realloc |
Pointer to new realloc routine to use |
free |
Pointer to new free routine to use |
Description
Tells the PM library to use a set of user specified memory allocation routines instead of using the normal malloc/calloc/realloc/free standard C library functions. This is useful if you wish to use a third party debugging malloc library or perhaps a set of faster memory allocation functions with the PM library, or any apps that use the PM library (such as the MGL). Once you have registered your memory allocation routines, all calls to PM_malloc, PM_calloc, PM_realloc and PM_free will be revectored to your local memory allocation routines.
Note: This function should be called right at the start of your application, before you initialise any other components or libraries.
Note: Code compiled into Binary Portable DLL's and Drivers automatically end up calling these functions via the BPD C runtime library.
See Also
Copyright © 2002 SciTech Software, Inc. Visit our web site at http://www.scitechsoft.com