473,326 Members | 2,588 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,326 software developers and data experts.

Purify with GCC

Hi,
Can any one explain me how to correct the purify reported errors and warning( mem leaks), with simple examples.
Feb 9 '08 #1
6 3142
gpraghuram
1,275 Expert 1GB
Hi,
Can any one explain me how to correct the purify reported errors and warning( mem leaks), with simple examples.
Purify would clearly say you the function call sequence which resulted with every leak.
You have to start looking at the sequence and start clearing the error.
If you need something else post again

Raghuram
Feb 9 '08 #2
Thanks for your response
I tried with simple program simple.cpp
#include<iostream.h>
int main() {
char *str = new char[25];
" Testing purify ";
cout << " str is " << str << endl ;
delete[] str ;

return 0;
}

commands:
compiling -> purify g++ -g -gstabs simple.cpp
executing-> ./a.out

But purify giving memory leaks, even i added delete statement.
Please correct the above program to make memory leaks zero.

Thanks
Pavan Ghooli.




Purify would clearly say you the function call sequence which resulted with every leak.
You have to start looking at the sequence and start clearing the error.
If you need something else post again

Raghuram
Feb 11 '08 #3
gpraghuram
1,275 Expert 1GB
I have ran purify separately and calling the executable from purify.
I think what u are trying is to compile the code with purify instrumentation.

Try running the executable from purify and check whether u are getting any leaks

Raghuram
Feb 11 '08 #4
I am sorry, can we call executable from purify?
U mean compile without purify
g++ -g -gstabs simple.cpp
then invoke the executable from purify.
purify <may_some_options> a.out

I searched in net for long time, no where found that we can invoke exe from purify.
Please explain me with simple program(wat i written), with commands also.

Thanks
Pavan Ghooli.

I have ran purify separately and calling the executable from purify.
I think what u are trying is to compile the code with purify instrumentation.

Try running the executable from purify and check whether u are getting any leaks

Raghuram
Feb 11 '08 #5
gpraghuram
1,275 Expert 1GB
I am sorry, can we call executable from purify?
U mean compile without purify
g++ -g -gstabs simple.cpp
then invoke the executable from purify.
purify <may_some_options> a.out

I searched in net for long time, no where found that we can invoke exe from purify.
Please explain me with simple program(wat i written), with commands also.

Thanks
Pavan Ghooli.

I have used Purify on windows some time back.
As u start purify u will get a GUI in which you can call the executable.
Try to read the Purify user guide for this.

Raghuram
Feb 12 '08 #6
Thanks a lot.

Pavan Ghooli

I have used Purify on windows some time back.
As u start purify u will get a GUI in which you can call the executable.
Try to read the Purify user guide for this.

Raghuram
Feb 12 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Tomer Ben-David | last post by:
Hi I downloaded purify. Im running a simple hello world through purify on windows2000 machine. However whenever the purify runs it i get in the console window: Error occurred during...
2
by: tomekj | last post by:
Hello Everyone - I posted this question in Fortran section few days ago, but got no replies so far - so I post it again here: I would appreciate if someone could suggest some momory debugging...
7
by: Matthew | last post by:
Hi, I am using sun's CC (c++ compiler) to compile the follow code: #define __REENTRANT #include <stdio.h> #include <pthread.h> void *one(void *dummy);
3
by: grahamo | last post by:
Hey, maybe a little off topic but I'm running round in circles here... I am aware of a couple of other memory tracking products out there but I would like to know of ALL of them. So far I...
4
by: hcc | last post by:
Hi, Does anyone have experience with using Purify with db2 CLI application? We're using Purify to diagnose some problem in our multi-thread CLI application, and we're getting lots of the "UMR:...
10
by: eyh5 | last post by:
Hi, My C code (running on Soalris Unix) has some "segmentation fault" that I wish to use purify to do it. I poked around the web, and found some information about adding some lines in a Makefile...
2
by: saby | last post by:
Can anybody knowing Rational Purify help me? I am instrumenting an exe on solaris using Rational Purify. While building the exe, known as "DPSRun", it does not give any problem. But while I...
1
by: Teddy | last post by:
Hey guyes I am getting problem with purify. I am using g++ compiler on Solaris 5.10 and linking it with purify. Whenever I compiled program with purify option I get CORE DUMP error with message...
2
by: Achint Mehta | last post by:
Hi, I am running purify on my program (on linux with gcc ver. 3.4.6) I have installed a signal handler (for timer) using sigaction. I am passing a pointer (data) into the sival_ptr which I...
4
by: sudheer786 | last post by:
A purify error while doing build is setup -------------------------------------------------------------------------------- Hi all, I was facing a strange error while trying to run my labeled...
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: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.