xpcom/base/pure.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/xpcom/base/pure.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,135 @@
     1.4 +/*
     1.5 + * Header file of Pure API function declarations.
     1.6 + *
     1.7 + * Explicitly no copyright.
     1.8 + * You may recompile and redistribute these definitions as required.
     1.9 + *
    1.10 + * Version 1.0
    1.11 + */
    1.12 +
    1.13 +#if defined(c_plusplus) || defined(__cplusplus)
    1.14 +extern "C" {
    1.15 +#endif
    1.16 +
    1.17 +#define PURE_H_VERSION 1
    1.18 +
    1.19 +//////////////////////////////
    1.20 +// API's Specific to Purify //
    1.21 +//////////////////////////////
    1.22 +
    1.23 +// TRUE when Purify is running.
    1.24 +int __cdecl PurifyIsRunning(void)			;
    1.25 +//
    1.26 +// Print a string to the viewer.
    1.27 +//
    1.28 +int __cdecl PurePrintf(const char *fmt, ...)		;
    1.29 +int __cdecl PurifyPrintf(const char *fmt, ...)		;
    1.30 +//
    1.31 +// Purify functions for leak and memory-in-use functionalty.
    1.32 +//
    1.33 +int __cdecl PurifyNewInuse(void)			;
    1.34 +int __cdecl PurifyAllInuse(void) 			;
    1.35 +int __cdecl PurifyClearInuse(void)			;
    1.36 +int __cdecl PurifyNewLeaks(void)			;
    1.37 +int __cdecl PurifyAllLeaks(void)			;
    1.38 +int __cdecl PurifyClearLeaks(void)			;
    1.39 +//
    1.40 +// Purify functions for handle leakage.
    1.41 +//
    1.42 +int __cdecl PurifyAllHandlesInuse(void)			;
    1.43 +int __cdecl PurifyNewHandlesInuse(void)			;
    1.44 +//
    1.45 +// Functions that tell you about the state of memory.
    1.46 +//
    1.47 +int __cdecl PurifyDescribe(void *addr)			;
    1.48 +int __cdecl PurifyWhatColors(void *addr, int size) 	;
    1.49 +//
    1.50 +// Functions to test the state of memory.  If the memory is not
    1.51 +// accessible, an error is signaled just as if there were a memory
    1.52 +// reference and the function returns false.
    1.53 +//
    1.54 +int __cdecl PurifyAssertIsReadable(const void *addr, int size)	;
    1.55 +int __cdecl PurifyAssertIsWritable(const void *addr, int size)	;
    1.56 +//
    1.57 +// Functions to test the state of memory.  If the memory is not
    1.58 +// accessible, these functions return false.  No error is signaled.
    1.59 +//
    1.60 +int __cdecl PurifyIsReadable(const void *addr, int size)	;
    1.61 +int __cdecl PurifyIsWritable(const void *addr, int size)	;
    1.62 +int __cdecl PurifyIsInitialized(const void *addr, int size)	;
    1.63 +//
    1.64 +// Functions to set the state of memory.
    1.65 +//
    1.66 +void __cdecl PurifyMarkAsInitialized(void *addr, int size)	;
    1.67 +void __cdecl PurifyMarkAsUninitialized(void *addr, int size)	;
    1.68 +//
    1.69 +// Functions to do late detection of ABWs, FMWs, IPWs.
    1.70 +//
    1.71 +#define PURIFY_HEAP_CRT 					0xfffffffe
    1.72 +#define PURIFY_HEAP_ALL 					0xfffffffd
    1.73 +#define PURIFY_HEAP_BLOCKS_LIVE 			0x80000000
    1.74 +#define PURIFY_HEAP_BLOCKS_DEFERRED_FREE 	0x40000000
    1.75 +#define PURIFY_HEAP_BLOCKS_ALL 				(PURIFY_HEAP_BLOCKS_LIVE|PURIFY_HEAP_BLOCKS_DEFERRED_FREE)
    1.76 +int __cdecl PurifyHeapValidate(unsigned int hHeap, unsigned int dwFlags, const void *addr)	;
    1.77 +int __cdecl PurifySetLateDetectScanCounter(int counter);
    1.78 +int __cdecl PurifySetLateDetectScanInterval(int seconds);
    1.79 +
    1.80 +
    1.81 +////////////////////////////////
    1.82 +// API's Specific to Quantify //
    1.83 +////////////////////////////////
    1.84 +
    1.85 +// TRUE when Quantify is running.
    1.86 +int __cdecl QuantifyIsRunning(void)			;
    1.87 +
    1.88 +//
    1.89 +// Functions for controlling collection
    1.90 +//
    1.91 +int __cdecl QuantifyDisableRecordingData(void)		;
    1.92 +int __cdecl QuantifyStartRecordingData(void)		;
    1.93 +int __cdecl QuantifyStopRecordingData(void)		;
    1.94 +int __cdecl QuantifyClearData(void)			;
    1.95 +int __cdecl QuantifyIsRecordingData(void)		;
    1.96 +
    1.97 +// Add a comment to the dataset
    1.98 +int __cdecl QuantifyAddAnnotation(char *)		;
    1.99 +
   1.100 +// Save the current data, creating a "checkpoint" dataset
   1.101 +int __cdecl QuantifySaveData(void)			;
   1.102 +
   1.103 +////////////////////////////////
   1.104 +// API's Specific to Coverage //
   1.105 +////////////////////////////////
   1.106 +
   1.107 +// TRUE when Coverage is running.
   1.108 +int __cdecl CoverageIsRunning(void)			;
   1.109 +//
   1.110 +// Functions for controlling collection
   1.111 +//
   1.112 +int __cdecl CoverageDisableRecordingData(void)		;
   1.113 +int __cdecl CoverageStartRecordingData(void)		;
   1.114 +int __cdecl CoverageStopRecordingData(void)		;
   1.115 +int __cdecl CoverageClearData(void)			;
   1.116 +int __cdecl CoverageIsRecordingData(void)		;
   1.117 +// Add a comment to the dataset
   1.118 +int __cdecl CoverageAddAnnotation(char *)		;
   1.119 +
   1.120 +// Save the current data, creating a "checkpoint" dataset
   1.121 +int __cdecl CoverageSaveData(void)			;
   1.122 +
   1.123 +
   1.124 +
   1.125 +
   1.126 +////////////////////////////////
   1.127 +// API's Specific to Purelock //
   1.128 +////////////////////////////////
   1.129 +
   1.130 +// TRUE when Purelock is running.
   1.131 +int __cdecl PurelockIsRunning(void)			;
   1.132 +
   1.133 +
   1.134 +
   1.135 +
   1.136 +#if defined(c_plusplus) || defined(__cplusplus)
   1.137 +}
   1.138 +#endif

mercurial