On Thu, 2013-03-14 at 19:21 +0000, Phil Longstaff wrote:

> Memcheck will report that memory is potentially lost if there is no
> pointer to the beginning of a block, but there is an internal pointer.
> One valid use of an internal pointer is a pointer to a base class in C
> ++.  How hard would it be for memcheck to not report a block as being
> potentially lost if the internal pointer could be a pointer to a base
> class?  Is there sufficient info in the debug information?
No, I do not think so.
I think the debug info can only describe stack and global variables,
but cannot be used to "map" a malloc-ed/new-ed memory ptr to a class.
IIRC, another leak checker tool (maybe DrMemory?) had an heuristic
to guess that an interior pointer was pointing inside such a OO
type.

Philippe




------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_mar
_______________________________________________
Valgrind-users mailing list
Valgrind-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/valgrind-users

Reply via email to