Go to the
documentation of this file.
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #pragma once
00020 #include <WTypes.h>
00021 #include <crtdbg.h>
00022 #include <malloc.h>
00023 #include <new.h>
00024
00025 #include "utilexp.h"
00026
00027 #undef MAXMEM_EXTERN_C
00028 #ifdef __cplusplus
00029 # define MAXMEM_EXTERN_C extern "C"
00030 #else
00031 # define MAXMEM_EXTERN_C
00032 #endif
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045 UtilExport void *__cdecl MAX_new(size_t size);
00046
00047 UtilExport void *__cdecl MAX_new_array(size_t size);
00048
00049
00050
00051
00052 UtilExport void __cdecl MAX_delete(void* mem);
00053
00054 UtilExport void __cdecl MAX_delete_array(void* mem);
00055
00056
00057
00058
00059
00060 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_malloc)(size_t size);
00061
00062
00063 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_calloc)(size_t num, size_t size);
00064
00065
00066 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_realloc)(void *memblock, size_t size);
00067
00068
00069 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_expand)(void * memblock, size_t size);
00070
00071
00072 MAXMEM_EXTERN_C UtilExport void (__cdecl *MAX_free)(void * memblock);
00073
00074
00075 MAXMEM_EXTERN_C UtilExport size_t (__cdecl *MAX_msize)(void *memblock);
00076
00077
00078
00079
00080
00081
00082 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_heapadd)(void * memblock, size_t size);
00083
00084
00085 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_heapchk)(void);
00086
00087
00088 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_heapmin)(void);
00089
00090
00091 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_heapset)(unsigned int fill);
00092
00093
00094 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_heapwalk)(_HEAPINFO *entryinfo);
00095
00096
00097 MAXMEM_EXTERN_C UtilExport _PNH (__cdecl *MAX_query_new_handler)( void );
00098
00099
00100 MAXMEM_EXTERN_C UtilExport _PNH (__cdecl *MAX_set_new_handler)( _PNH pNewHandler );
00101
00102
00103 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_query_new_mode)( void );
00104
00105
00106 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_set_new_mode)( int newhandlermode );
00107
00108
00109 MAXMEM_EXTERN_C UtilExport size_t (__cdecl *MAX_get_sbh_threshold)(void);
00110 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_set_sbh_threshold)(size_t size);
00111
00112
00113
00114
00115
00116 #ifdef _DEBUG
00117 #ifndef IS_HYBRID
00118
00119
00120 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_calloc_dbg)(size_t num, size_t size, int blockType, const char * filename, int lineNumber);
00121
00122
00123 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_expand_dbg)(void * userData, size_t newSize, int blockType, const char * filename, int lineNumber);
00124
00125
00126 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_malloc_dbg)(size_t size,int blockType,const char *filename,int lineNumber);
00127
00128
00129 MAXMEM_EXTERN_C UtilExport void (__cdecl *MAX_free_dbg)(void * userData, int blockType);
00130
00131
00132 MAXMEM_EXTERN_C UtilExport size_t (__cdecl *MAX_msize_dbg)(void *userData, int blockType);
00133
00134
00135 MAXMEM_EXTERN_C UtilExport void * (__cdecl *MAX_realloc_dbg)(void *userData, size_t newSize, int blockType, const char *filename, int lineNumber);
00136
00137 MAXMEM_EXTERN_C UtilExport extern long& MAX_crtAssertBusy;
00138
00139
00140 MAXMEM_EXTERN_C UtilExport _CRT_REPORT_HOOK (__cdecl *MAX_CrtSetReportHook)(_CRT_REPORT_HOOK reportHook);
00141
00142
00143 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtSetReportMode)(int reportType,int reportMode);
00144
00145
00146 MAXMEM_EXTERN_C UtilExport _HFILE (__cdecl *MAX_CrtSetReportFile)(int reportType,_HFILE reportFile);
00147
00148
00149 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtDbgReport)(int,const char *,int,const char *,const char *,...);
00150
00151 MAXMEM_EXTERN_C UtilExport void __cdecl MAX_CrtDbgBreak(void);
00152
00153 MAXMEM_EXTERN_C UtilExport extern long& MAX_crtBreakAlloc;
00154
00155
00156 MAXMEM_EXTERN_C UtilExport long (__cdecl *MAX_CrtSetBreakAlloc)(long lBreakAlloc);
00157
00158
00159 MAXMEM_EXTERN_C UtilExport _CRT_ALLOC_HOOK (__cdecl *MAX_CrtSetAllocHook)(_CRT_ALLOC_HOOK allocHook);
00160
00161 MAXMEM_EXTERN_C UtilExport extern int& MAX_crtDbgFlag;
00162
00163
00164 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtCheckMemory)(void);
00165
00166
00167 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtSetDbgFlag)(int newFlag);
00168
00169
00170 MAXMEM_EXTERN_C UtilExport void (__cdecl *MAX_CrtDoForAllClientObjects)(void (*pfn)(void *, void *),void *context);
00171
00172
00173 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtIsValidPointer)(const void *address,unsigned int size,int access);
00174
00175
00176 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtIsValidHeapPointer)(const void *userData);
00177
00178
00179 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtIsMemoryBlock)(const void *userData,unsigned int size,long *requestNumber,char **filename,int *linenumber);
00180
00181
00182 MAXMEM_EXTERN_C UtilExport _CRT_DUMP_CLIENT (__cdecl *MAX_CrtSetDumpClient)(_CRT_DUMP_CLIENT dumpClient);
00183
00184
00185 MAXMEM_EXTERN_C UtilExport void (__cdecl *MAX_CrtMemCheckpoint)(_CrtMemState *state);
00186
00187
00188 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtMemDifference)(_CrtMemState *stateDiff,const _CrtMemState *oldState,const _CrtMemState *newState);
00189
00190
00191 MAXMEM_EXTERN_C UtilExport void (__cdecl *MAX_CrtMemDumpAllObjectsSince)(const _CrtMemState *state);
00192
00193
00194 MAXMEM_EXTERN_C UtilExport void (__cdecl *MAX_CrtMemDumpStatistics)(const _CrtMemState *state);
00195
00196
00197 MAXMEM_EXTERN_C UtilExport int (__cdecl *MAX_CrtDumpMemoryLeaks)(void);
00198
00199 #endif //IS_HYBRID
00200 #endif //_DEBUG
00201
00202