[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



On Sat, 25 Sep 2004, Geoffrey wrote:

> >>>On Fri, 24 Sep 2004, Barry Rountree wrote:
  ...
> >>>>__FILE__::__LINE__ is now creating a __WHATEVER__, address 0xabcddcab
> >>>>__FILE__::__LINE__ is now deleting a __WHATEVER__, address 0xabcddcab
  ...
> >>Excellent points both.  What we used to do when we were oft times 
> >>allocating memory in many section of code is add some #ifdefs to track 
> >>allocation and freeing.  Start the output with the memory address so 
> >>that one can simply pipe the output to sort and should see matching 
> >>allocations/frees:
> >>
> >>804845c : allocated, foo.c(345)
> >>804845c : freed, foo.c(345)
> > 
> > 
> > I might name the specific function, as line numbers change freely.
 
> Not sure I understand that logic.  As the line numbers change, so does 
> the output, therefore you'd always have accurate data.

Aha - I supposed I would be entering explicit text to replace 
__FILE__::__LINE__ - Are these predefined symbols that [say] cpp fills in 
during compilation? That's very nice to know. 

 - John Mills
   john.m.mills at alum.mit.edu


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00856" href="msg00856.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
<ul><li><em>From:</em> rountree at cs.uga.edu (Barry Rountree)</li></ul></li>
<li><strong><a name="00857" href="msg00857.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<ul><li><strong>References</strong>:
<ul>
<li><strong><a name="00854" href="msg00854.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
<ul><li><em>From:</em> esoteric at 3times25.net (Geoffrey)</li></ul></li>
</ul></li></ul>
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00854.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00856.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00854.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00856.html">[ale] C++ Debuggery and the Path of Destruction</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00855"><strong>Date</strong></a></li>
<li><a href="threads.html#00855"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>