Forum > General

How reliable is HeapTrc?

(1/1)

BrainChemistry:
Hi there,

how reliable is HeapTrc in detecting memory leaks? In other words, if it doesn't show any unfree'd memory blocks, is it very likely there are no memory leaks or is it highly dependent on the program design?

[You may skip this additional information: The reason why I ask this is because of this: I have structures in memory which have to be free'd by specific free routines (from shared libraries) for these structures. Anyway, HeapTrc isn't showing unfree'd blocks if I just use Pascal's free routines.]

Thanks for clarification in advance.

Leledumbo:

--- Quote from: BrainChemistry on June 21, 2018, 12:01:30 am ---how reliable is HeapTrc in detecting memory leaks? In other words, if it doesn't show any unfree'd memory blocks, is it very likely there are no memory leaks or is it highly dependent on the program design?

--- End quote ---
As long as it's a single executable program, it's very reliable. If it reports no memory leaks, it means no memory leaks. Things are different if your program communicates with shared library even if it's written in FPC as well. Each executable (including a shared library) contains whole copy of the RTL (that has memory manager), so heaptrc works per executable, not across the boundary.

BrainChemistry:

--- Quote from: Leledumbo on June 21, 2018, 04:38:03 am ---Each executable (including a shared library) contains whole copy of the RTL (that has memory manager), so heaptrc works per executable, not across the boundary.

--- End quote ---

I see, thanks.

totya:

--- Quote from: BrainChemistry on June 21, 2018, 12:01:30 am ---Hi there, how reliable is HeapTrc in detecting memory leaks?
--- End quote ---

Very useful as I see.

Navigation

[0] Message Index

Go to full version