check_leaks

Function Description

msLeaks exposes this API for fast memory leak analysis.

Function Prototype

check_leaks(input_path: str, mstx_info: str, start_index: int)

Parameter Description

All input parameters must be obtained according to list_analyzers and get_analyzer_config. For details, see Table 1.

Table 1 Parameter Description

Parameter

Input/Output

Description

input_path

Input

Path of the .csv file collected using msLeaks. The absolute path is required.

mstx_info

Input

mstx text information used for mark instrumentation, which is used to identify the range of leak analysis.

start_index

Input

Index of the mstx instrumentation for starting leak analysis.

Return Value Description

After the API is executed, the memory leak analysis result is directly printed.

Example

1
2
3
import msleaks
msleaks.check_leaks(input_path="user/leaks.csv",mstx_info="test",start_index=0)
# Use the actual path for input_path.