GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 27-Oct-2009, 04:35
ahbi82 ahbi82 is offline
Member
 
Join Date: Jul 2006
Posts: 204
ahbi82 will become famous soon enough

Help in class testing.


I would like to ask if anyone has any idea how to test memory leak on the implemented classes.

I did wrote a test interface to do simple testing like construct, destructor, copy constructor, operators.... ect.

However i would like to test for memory leak as my application requires loads of memory. In other words, i want to draft a test plan for the various module classes before and in the end a system test plan for the whole system.

1.) Get memory left - >m1
2.) Do some operations using the class.
2.) Get memory left -> m2

if m1 - m2 == 0, meaning no memory leak. What functions API can i use to obtain the memory left. But i have one question; the "memory" obtain is from the system overall memory, but if some other processes in the background are consuming some memory, it will lead to incorrect results.

I read from the MSDN that i can overload the "new" and "delete" operators to use our own memory allocations. Anyone has any idea to do that?

Has anyone had an experience using Intel C++ compiler?? I read from the specs that its giving 30 to 50% faster speed from its libraries. Kindly comment!

THANKS IN ADVANCE!
  #2  
Old 27-Oct-2009, 07:42
fakepoo fakepoo is offline
Regular Member
 
Join Date: Oct 2007
Posts: 761
fakepoo is a jewel in the roughfakepoo is a jewel in the roughfakepoo is a jewel in the rough

Re: Help in class testing.


Try running it with a bounds-checking program. I have done this in the past and it finds memory leaks.
 
 

Recent GIDBlogVista ?Widgets? on Windows XP by LocalTech

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Returning a Struct to a separate class usmsci C++ Forum 9 07-Feb-2007 08:34
Hard drive/CPU Diagnoses Issues binarybug Computer Hardware Forum 1 22-Jan-2007 19:23
Box Class, need help again :( TransformedBG C++ Forum 7 13-Nov-2006 15:11
C++ class -- Please help vnca_1 C++ Forum 3 14-Jun-2006 12:31
a tester class and then some. postage Java Forum 1 06-May-2006 15:48

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 21:16.


vBulletin, Copyright © 2000 - 2010, Jelsoft Enterprises Ltd.