Workshop C++ Memory Leak Test

Workshop C++ Memory Leak Test

Post by Larry Lindstro » Sat, 25 Mar 2000 04:00:00



   I have the current Workshop C++/Intel, I
don't see an "About" button, but it's the one
that's been available for the last six months
or a year.  I think it's version 5.  

   I'm trying to use the memory leak report.  
I'm having trouble getting what I want from it.  
The report looks like this:
                   -------------------------

Actual leaks report    (actual leaks:        56  total size:     252
bytes)
Memory Leak (mel):
Found 56 leaked blocks with total size 252 bytes
At time of each allocation, the call stack was:
        operator new<-operator new[]

Possible leaks report  (possible leaks:       0  total size:       0
bytes)

                   -------------------------

   This is the detailed report with "Show new leaks".  

   I have a breakpoint at the end of each transaction,
and each transaction builds a large linked list and
then disposes of most of it.  But I'm loosing a
consistent 252 or 254 bytes each time.  There will
be thousands of transactions a day, this application
needs to be 24 X 7.  So loosing a meg of memory a
day isn't going to work.  

   I guest I'd just like to see a little more detail
on the callstack than "operator new<-operator new[]".  
That's not telling me enough about where I'm blowing
it.  

   One possible problem is that I can't build the
source browser database.  sbquery consistently cores
out, so I don't bother running it.  

   Another problem is that I haven't used the memory
leak report before, perhaps I'm not using it properly.  

                                              Thanks
                                              Larry

 
 
 

Workshop C++ Memory Leak Test

Post by Larry Lindstro » Sat, 25 Mar 2000 04:00:00


   I found the stack depth entry in the runtime check menu.  

   I've wanted this feature for a long time.  These leaks
are such a pain.  

                                                   Thanks
                                                   Larry

 
 
 

Workshop C++ Memory Leak Test

Post by Steve Bellen » Sat, 25 Mar 2000 04:00:00


At the dbx> prompt type help check. I think you want is

dbx> check -leaks -frames 16 -match 16



Quote:>   I have the current Workshop C++/Intel, I
>don't see an "About" button, but it's the one
>that's been available for the last six months
>or a year.  I think it's version 5.  

>   I'm trying to use the memory leak report.  
>I'm having trouble getting what I want from it.  
>The report looks like this:
>                   -------------------------

>Actual leaks report    (actual leaks:        56  total size:     252
>bytes)
>Memory Leak (mel):
>Found 56 leaked blocks with total size 252 bytes
>At time of each allocation, the call stack was:
>        operator new<-operator new[]

>Possible leaks report  (possible leaks:       0  total size:       0
>bytes)

>                   -------------------------

>   This is the detailed report with "Show new leaks".  

>   I have a breakpoint at the end of each transaction,
>and each transaction builds a large linked list and
>then disposes of most of it.  But I'm loosing a
>consistent 252 or 254 bytes each time.  There will
>be thousands of transactions a day, this application
>needs to be 24 X 7.  So loosing a meg of memory a
>day isn't going to work.  

>   I guest I'd just like to see a little more detail
>on the callstack than "operator new<-operator new[]".  
>That's not telling me enough about where I'm blowing
>it.  

>   One possible problem is that I can't build the
>source browser database.  sbquery consistently cores
>out, so I don't bother running it.  

>   Another problem is that I haven't used the memory
>leak report before, perhaps I'm not using it properly.  

>                                              Thanks
>                                              Larry

--
http://www.math.fsu.edu/~bellenot
bellenot <At/> math.fsu.edu
+1.850.644.7189 (4053fax)
 
 
 

1. Sun workshop memory monitor does not detect all memory leak

Cud somebody tell me wat is happening???
I am checking if I can use Sun WorkShop Memory Monitor as a substitute for
Rational purify
but this simple leak is not detected.

#include <iostream.h>
int main()
{
int *name ;
name = new int[10];                                 <-------this is not
detected as leak
cout<< "name is "<<name[0] <<endl;
delete [] name;
return 0;

 On the other hand if i allocate memory in a loop like this it is detected
as a leak

#include <iostream.h>
int main()
{
int *name ;
/for (int i=0; i<3 ; i++)
    name = new int[10];                                 <-------this is
detected as leak
cout<< "name is "<<name[0] <<endl;
delete [] name;
return 0;

Is it safe to go ahead and use Sun WorkShop Memory Monitor instead of
purify?

2. Serial-console

3. debug memory leaks with Sun workshop tool

4. first steps...

5. Sell me your C++ Workshop or Visual Workshop

6. Boot Floppy with X

7. Drawing Memory Data Structures - Workshop C++.

8. About "Expect"

9. Memory Leak in C++

10. Detecting C++ Memory Leaks in Solaris 2.5?

11. memory leak in c++/programm

12. C++ memory leak detector for Linux

13. C++ Memory Leak Detection on SCO