LabVIEW Idea Exchange

Showing results for 
Search instead for 
Did you mean: 

Highlight memory leaks in Desktop Execution Trace Toolkit

Status: New

If I get the sematic of trace memory allocations right, every "Memory Allocate" event for a given handle should be accompanied by a "Memory Free" event somewhen later for the same handle or there is a memory leak. Given that, the trace toolkit desperately needs a feature that highlights all "Memory Allocate" events where no free event exists. Moreover, the event details should not only contain the VI that allocated the memory but also the concrete diagram element. Optimal would be switching to Labview and highlighting the element in the diagram just like the "LabVIEW Compare" tool does.

For now I'm helping myself by

  • exporting the traces to text,
  • deleting everything except the handle in "Details" using regular expressions in ultra edit: ;^(?*^)^p
  • deleting all "Memory Resize" events for performance reasons: ^p^(?*^)Memory Resize^(?*^)^p
  • renaming the column name "#" with "ID"
  • importing the text file into an access database
  • executing an SQL statement that gives me the ID's of all open memory allocations:
  SELECT, c.Beginn 
  FROM queueTest2 AS q1 LEFT JOIN (
       SELECT, AS Beginn, Min( AS Ende
       FROM queueTest2 AS q1, queueTest2 AS q2
       WHERE q1.event='Memory Allocate' 
       And q2.event='Memory Free' 
       And q1.Details=q2.Details
       GROUP BY, AS c 
  ON ( AND q1.Event='Memory Allocate'))  AS jo
WHERE isNull(jo.Beginn)

Please note that a Bug in MS Access 2007 reformats this statement on saving it in a way that executing it gives an join expression not supported error. This can be fixed by putting the ON statement into braces again (don't press save before executing).

1 Comment

This is an older post, but I am now running into the same basic need.  In general, DETT gives too much information and not enough ways to highlight and flag entries, like Detailed Tracing in the real-time version.  Anybody else run into this?