473,320 Members | 1,979 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

figuring Memory leaks

Jim
I got a program in C which takes unusual memory while running. Since I
have not written the program I dont have much idea abt the program
details. One way is obviously going thru the code and verifying.
Leaving this aside, I want to figure out why is this program chewing
so much of memory (sometimes 1 GB). I tried running on Rational Purify
but that simply exits. So can anyone suggest me some ways/ techniuqes
that one should follow for debugging these kind of problems. Do we
have any memory profiling tools that log the memory usage of the
program or a typical funtion. Thanks.. :~
Nov 13 '05 #1
1 1519

"Jim" <ha********@sify.com> wrote in message
Leaving this aside, I want to figure out why is this program chewing
so much of memory (sometimes 1 GB). I tried running on Rational Purify
but that simply exits. So can anyone suggest me some ways/ techniuqes
that one should follow for debugging these kind of problems. Do we
have any memory profiling tools that log the memory usage of the
program or a typical funtion. Thanks.. :~

There's no tool that works on all platforms, though there are plenty of leak
detectors on the market that will work with particular compilers.

If you can't find such a tool, there is no ideal way of finding out where
memory is leaking. You can try replacing malloc() with a home-grown function
that does logging (this is the technique we generally use). You can look
though the code - most allocations have a matching free in the same function
so can be discounted, leaving a few potential leaks.
Nov 13 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Maurice | last post by:
Hi there, I'm experiencing big memory problems on my webserver. First on an old RedHat 7.2 system, now on an other fresh installed Suse 8.2 system: Linux version 2.4.20-4GB...
2
by: Generic Usenet Account | last post by:
I have been using STL for a long time now, without any problems. Recently we generated a purification report on our software using Rational Purify, and we found some memory leaks. My colleague...
3
by: laniik | last post by:
Hi. I was wondering if there were any known leaks using STL vectors. Also, I was wondering if I have to do any sort of deleting or memory clearing when im done with the vector, or will they be...
0
by: Frank Lopez | last post by:
Does anyone know if Microsoft generated a whitepaper on this topic? Does anyone know what the solution is? (meaning, eliminate the leak problem -- I am seeing three memory leaks from...
4
by: ali.jan | last post by:
Hi, It is trivial to load an assembly in a new Application Domain. Is there any way of loading an assembly in a new process? I tried using the Process class like this: Process p = new...
5
by: cnickl | last post by:
Some time ago I was looking for a cheap or free way to check an application written in C# and some unsafe code for memory leaks. Someone in this forum suggested DevPartner form Compuware, telling...
3
by: Jim Land | last post by:
Jack Slocum claims here http://www.jackslocum.com/yui/2006/10/02/3-easy-steps-to-avoid-javascript- memory-leaks/ that "almost every site you visit that uses JavaScript is leaking memory". ...
6
by: nmehring | last post by:
I have an MFC app with 2000 users. I have one user that experiences a crash in our software anywhere from 1 to 5 times a week when opening a particular module. No other users have reported this...
11
by: dhtml | last post by:
(originally mis-posted on m.p.s.jscript...) I've just closed all windows in Firefox and its using 244MB of memory. I have no idea why. I had GMail open, a page from unicode, the CLJ FAQ. ...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.