Is there any method to supervise the memory's waste?

Y

yanchun.yang

I wrote a large code, but it spends memory very quick. Is there any
method to supervise memory's use and watch whether there is some waste?
 
W

wavelet

In windows,system tool can helps.
In unix, some Solaris has a a number of tools.
Firstly, "pmap" gives you a nice breakdown of the process' memory usage.
If you're on x86 you can probably compile Valgrind for solaris: that's
pretty much the golden standard. If you're on Sparc then I suggest the
open source Dmalloc library. Electric fence is an oldie but a goodie,
and it's had leak detection bolted on.

Above anwser from Jacques.
 
Y

yanchun.yang

I forget to say that I always use new and delete to create and delete
some matrix
 
S

Shezan Baig

I wrote a large code, but it spends memory very quick. Is there any
method to supervise memory's use and watch whether there is some waste?

It's much easier to not use 'new' and 'delete' than to find where the
leaks come from. Try using vector, it takes care of memory for you.

Hope this helps,
-shez-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top