mirror of
https://github.com/espressif/esp-idf.git
synced 2025-11-03 00:21:44 +01:00
Merge branch 'feat/heap-trace-stop-recording-allocs-but-not-free' into 'master'
feat(heap-trace): Add a pause state to the heap tracing Closes IDFGH-12836 See merge request espressif/esp-idf!30962
This commit is contained in:
@@ -216,7 +216,8 @@ Once you have identified the code which you think is leaking:
|
||||
- Enable the :ref:`CONFIG_HEAP_TRACING_DEST` option.
|
||||
- Call the function :cpp:func:`heap_trace_init_standalone` early in the program, to register a buffer that can be used to record the memory trace.
|
||||
- Call the function :cpp:func:`heap_trace_start` to begin recording all mallocs or frees in the system. Call this immediately before the piece of code which you suspect is leaking memory.
|
||||
- Call the function :cpp:func:`heap_trace_stop` to stop the trace once the suspect piece of code has finished executing.
|
||||
- Call the function :cpp:func:`heap_trace_stop` to stop the trace once the suspect piece of code has finished executing. This state will stop the tracing of both allocations and frees.
|
||||
- Call the function :cpp:func:`heap_trace_alloc_pause` to pause the tracing of new allocations while continuing to trace the frees. Call this immediately after the piece of code which you suspect is leaking memory to prevent any new allocations to be recorded.
|
||||
- Call the function :cpp:func:`heap_trace_dump` to dump the results of the heap trace.
|
||||
|
||||
The following code snippet demonstrates how application code would typically initialize, start, and stop heap tracing:
|
||||
|
||||
Reference in New Issue
Block a user