Kawe Mazidjatari b3a68ed095 Add EABase, EAThread and DirtySDK to R5sdk
DirtySDK (EA's Dirty Sockets library) will be used for the LiveAPI implementation, and depends on: EABase, EAThread.
2024-04-05 18:29:03 +02:00

63 lines
1.8 KiB
C

/*H********************************************************************************/
/*!
\File zmemtrack.h
\Description
Routines for tracking memory allocations.
\Copyright
Copyright (c) 2005 Electronic Arts Inc.
\Version 02/15/2005 (jbrookes) First Version, based on jfrank's implementation.
*/
/********************************************************************************H*/
#ifndef _zmemtrack_h
#define _zmemtrack_h
/*** Include files ****************************************************************/
/*** Defines **********************************************************************/
#define ZMEMTRACK_PRINTFLAG_TRACKING (1) //!< print more verbose output
/*** Macros ***********************************************************************/
/*** Type Definitions *************************************************************/
//! logging function
typedef void (ZMemtrackLogCbT)(const char *pText, void *pUserData);
/*** Variables ********************************************************************/
/*** Functions ********************************************************************/
#ifdef __cplusplus
extern "C" {
#endif
// init Zmemtrack module
DIRTYCODE_API void ZMemtrackStartup(void);
// shut down Zmemtrack module
DIRTYCODE_API void ZMemtrackShutdown(void);
// set the logging callback
DIRTYCODE_API void ZMemtrackCallback(ZMemtrackLogCbT *pLoggingCb, void *pUserData);
// track an allocation
DIRTYCODE_API void ZMemtrackAlloc(void *pMem, uint32_t uSize, uint32_t uTag);
// track a free operation
DIRTYCODE_API void ZMemtrackFree(void *pMem, uint32_t *pSize);
// print current tracking info
DIRTYCODE_API void ZMemtrackPrint(uint32_t uFlags, uint32_t uTag, const char *pModuleName);
#ifdef __cplusplus
};
#endif
#endif // _zmemtrack_h