Find Memory Block Violations

Applies to AQTime 8.81, last modified on November 27, 2020

AQTime allows tracing attempts to write data beyond the allocated memory block. To enable the tracing, activate the Check Memory Bounds option of the Allocation profiler.

When a memory violation occurs, the Event View panel posts the following message: “AQTime detected unexpected data written before (or after) a memory block”, followed by the block address and its size.

Further investigation can be made using the Report panel. The contents of this panel depend on the results category that is selected in the Explorer panel - Classes Data or Objects. So, the way you search for memory block violations also depends on which of these two categories you choose:

Searching for Memory Block Violations - Classes Data Category

  1. Select the Classes Data category in the Explorer panel.

  2. Select a memory violation row in the Report panel. This row holds the Memory Overwrite Error value in the Class Name column. For more detailed information on columns values, see the Allocation Profiler - Report Panel topic.

  3. Make sure that the View Allocations Paths in Call Tree button is checked on the toolbar of the Report panel. This commands AQTime to display call data in the Call Tree panel.

  4. Switch to the Call Tree panel. It will display a sequence of function calls for the selected violation. Since errors with the memory block bounds are only found when the corresponding memory block is deleted or reallocated the call stack displays routine calls that led to the error detection, but not to the error appearance.

  5. Analyze the call stack column values to find the exact code line where the “defective” memory block was allocated.

Searching for Memory Block Violations - Objects Category

  1. Select the Objects category in the Explorer panel.

  2. Select a memory violation row in the Report panel. This row holds the Memory Overwrite Error value in the Class Name column. For more detailed information on columns values, see the Allocation Profiler - Report Panel topic.

  3. Switch to the Details panel.

  4. Examine the Creation Call Stack pane that displays the function call sequence for the selected violation. Since errors with the memory block bounds are only found when the corresponding memory block is deleted or reallocated the call stack displays routine calls that led to the error detection, but not to the error appearance.

  5. Analyze the call stack column values to find the exact code line where the “defective” memory block was allocated.

See Also

Memory and Resource Allocation Profiling
Best Practices and How to Tutorials
Allocation Profiler - Overview
Viewing Call Stacks
Checking Bounds of Memory Blocks

Highlight search results