BullseyeCoverage Up Contents Search

cov_reset - Reset Measurements in Memory

int cov_reset(void);

Description

Function cov_reset resets measurements to zero in memory for the current process. The coverage file is unaffected. All pointers in the run-time data structures are reset to allow subsequently unloading some object files from memory. This function does not clear the run-time error status.

This function is automatically declared in source files compiled by covc. In other source files, declare it by including <BullseyeCoverage.h>.

Return Value

If successful, cov_reset returns the negative number of object files cleared. Otherwise, it returns one of the error codes listed in Run-Time Errors.

Examples

#if _BullseyeCoverage
    cov_reset();
#endif

Notes

Each dynamic link library (DLL) is considered a separate process. Calling this function from inside a DLL only affects the coverage data in that DLL and does not affect coverage data in programs which call the DLL or other DLLs.

Updated: 26 Aug 2020