michael@0: /* michael@0: * Header file of Pure API function declarations. michael@0: * michael@0: * Explicitly no copyright. michael@0: * You may recompile and redistribute these definitions as required. michael@0: * michael@0: * Version 1.0 michael@0: */ michael@0: michael@0: #if defined(c_plusplus) || defined(__cplusplus) michael@0: extern "C" { michael@0: #endif michael@0: michael@0: #define PURE_H_VERSION 1 michael@0: michael@0: ////////////////////////////// michael@0: // API's Specific to Purify // michael@0: ////////////////////////////// michael@0: michael@0: // TRUE when Purify is running. michael@0: int __cdecl PurifyIsRunning(void) ; michael@0: // michael@0: // Print a string to the viewer. michael@0: // michael@0: int __cdecl PurePrintf(const char *fmt, ...) ; michael@0: int __cdecl PurifyPrintf(const char *fmt, ...) ; michael@0: // michael@0: // Purify functions for leak and memory-in-use functionalty. michael@0: // michael@0: int __cdecl PurifyNewInuse(void) ; michael@0: int __cdecl PurifyAllInuse(void) ; michael@0: int __cdecl PurifyClearInuse(void) ; michael@0: int __cdecl PurifyNewLeaks(void) ; michael@0: int __cdecl PurifyAllLeaks(void) ; michael@0: int __cdecl PurifyClearLeaks(void) ; michael@0: // michael@0: // Purify functions for handle leakage. michael@0: // michael@0: int __cdecl PurifyAllHandlesInuse(void) ; michael@0: int __cdecl PurifyNewHandlesInuse(void) ; michael@0: // michael@0: // Functions that tell you about the state of memory. michael@0: // michael@0: int __cdecl PurifyDescribe(void *addr) ; michael@0: int __cdecl PurifyWhatColors(void *addr, int size) ; michael@0: // michael@0: // Functions to test the state of memory. If the memory is not michael@0: // accessible, an error is signaled just as if there were a memory michael@0: // reference and the function returns false. michael@0: // michael@0: int __cdecl PurifyAssertIsReadable(const void *addr, int size) ; michael@0: int __cdecl PurifyAssertIsWritable(const void *addr, int size) ; michael@0: // michael@0: // Functions to test the state of memory. If the memory is not michael@0: // accessible, these functions return false. No error is signaled. michael@0: // michael@0: int __cdecl PurifyIsReadable(const void *addr, int size) ; michael@0: int __cdecl PurifyIsWritable(const void *addr, int size) ; michael@0: int __cdecl PurifyIsInitialized(const void *addr, int size) ; michael@0: // michael@0: // Functions to set the state of memory. michael@0: // michael@0: void __cdecl PurifyMarkAsInitialized(void *addr, int size) ; michael@0: void __cdecl PurifyMarkAsUninitialized(void *addr, int size) ; michael@0: // michael@0: // Functions to do late detection of ABWs, FMWs, IPWs. michael@0: // michael@0: #define PURIFY_HEAP_CRT 0xfffffffe michael@0: #define PURIFY_HEAP_ALL 0xfffffffd michael@0: #define PURIFY_HEAP_BLOCKS_LIVE 0x80000000 michael@0: #define PURIFY_HEAP_BLOCKS_DEFERRED_FREE 0x40000000 michael@0: #define PURIFY_HEAP_BLOCKS_ALL (PURIFY_HEAP_BLOCKS_LIVE|PURIFY_HEAP_BLOCKS_DEFERRED_FREE) michael@0: int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr) ; michael@0: int __cdecl PurifySetLateDetectScanCounter(int counter); michael@0: int __cdecl PurifySetLateDetectScanInterval(int seconds); michael@0: michael@0: michael@0: //////////////////////////////// michael@0: // API's Specific to Quantify // michael@0: //////////////////////////////// michael@0: michael@0: // TRUE when Quantify is running. michael@0: int __cdecl QuantifyIsRunning(void) ; michael@0: michael@0: // michael@0: // Functions for controlling collection michael@0: // michael@0: int __cdecl QuantifyDisableRecordingData(void) ; michael@0: int __cdecl QuantifyStartRecordingData(void) ; michael@0: int __cdecl QuantifyStopRecordingData(void) ; michael@0: int __cdecl QuantifyClearData(void) ; michael@0: int __cdecl QuantifyIsRecordingData(void) ; michael@0: michael@0: // Add a comment to the dataset michael@0: int __cdecl QuantifyAddAnnotation(char *) ; michael@0: michael@0: // Save the current data, creating a "checkpoint" dataset michael@0: int __cdecl QuantifySaveData(void) ; michael@0: michael@0: //////////////////////////////// michael@0: // API's Specific to Coverage // michael@0: //////////////////////////////// michael@0: michael@0: // TRUE when Coverage is running. michael@0: int __cdecl CoverageIsRunning(void) ; michael@0: // michael@0: // Functions for controlling collection michael@0: // michael@0: int __cdecl CoverageDisableRecordingData(void) ; michael@0: int __cdecl CoverageStartRecordingData(void) ; michael@0: int __cdecl CoverageStopRecordingData(void) ; michael@0: int __cdecl CoverageClearData(void) ; michael@0: int __cdecl CoverageIsRecordingData(void) ; michael@0: // Add a comment to the dataset michael@0: int __cdecl CoverageAddAnnotation(char *) ; michael@0: michael@0: // Save the current data, creating a "checkpoint" dataset michael@0: int __cdecl CoverageSaveData(void) ; michael@0: michael@0: michael@0: michael@0: michael@0: //////////////////////////////// michael@0: // API's Specific to Purelock // michael@0: //////////////////////////////// michael@0: michael@0: // TRUE when Purelock is running. michael@0: int __cdecl PurelockIsRunning(void) ; michael@0: michael@0: michael@0: michael@0: michael@0: #if defined(c_plusplus) || defined(__cplusplus) michael@0: } michael@0: #endif