|
From: Yeshurun, M. <mei...@in...> - 2005-09-08 17:59:27
|
Perhaps the stack trace for the directly lost blocks is different so
they are listed separately, i.e., in a different "loss record".
Regards,
Meir
-----Original Message-----
From: val...@li...
[mailto:val...@li...] On Behalf Of qd
Sent: Thursday, September 08, 2005 6:26 PM
To: Bob Rossi
Cc: val...@li...
Subject: Re: [Valgrind-users] what does "indirectly lost" mean?
Thanks Bob, my valgrind record is like this:
=3D=3D30386=3D=3D 243 bytes in 12 blocks are indirectly lost
in loss record 59 of 109
I can understand a record like this:
=3D=3D30386=3D=3D 386 (143 direct, 243 indirect) bytes in 2
blocks are definitely lost in loss record 57 of 109
which shows both direct and indirect leaks.
What I don't understand is how come I got an
"indirectly lost" without a corresponding "directly
lost".
-Quan
--- Bob Rossi <bo...@br...> wrote:
> On Wed, Sep 07, 2005 at 08:35:33PM -0700, qd wrote:
> > if I have a struct like this:
> >=20
> > struct mystruct{
> > char *a;
> > char *b;
> > };
> >=20
> > and valgrind says that "b" is indirectly lost,
> what
> > does it mean? Am I leaking only "b" or am I
> leaking
> > the whole struct?
> >=20
> > If only "b" is leaking, shouldn't it be a
> "directly
> > lost"?
> > If the whole struct is leaking, I'm expecting
> another
> > valgrind record saying that "mystruct" is leaking
> > which I didn't see in my case.
> >=20
> > Can someone clarify under what circumstances I'll
> get
> > a "indirectly lost" record?
> > Thanks!
>=20
> Please see this,
>=20
>
http://sourceforge.net/mailarchive/forum.php?thread_id=3D7922894&forum_id=
=3D
32038
>=20
> Bob Rossi
>=20
=09
=09
______________________________________________________
Click here to donate to the Hurricane Katrina relief effort.
http://store.yahoo.com/redcross-donate3/
-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle
Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing &
QA
Security * Process Improvement & Measurement *
http://www.sqe.com/bsce5sf
_______________________________________________
Valgrind-users mailing list
Val...@li...
https://lists.sourceforge.net/lists/listinfo/valgrind-users
|