[prev in list] [next in list] [prev in thread] [next in thread] 

List:       hpux-cxx-dev
Subject:    RE: CXX-DEV: Memroy Leak in an application using aCC ?!! (More
From:       "Sridhar Gudipati" <sridhargudipati () xius ! org>
Date:       2004-05-19 9:33:10
Message-ID: 001001c43d82$a02923b0$5896a8c0 () xius ! ltd
[Download RAW message or body]

Hi Dennis,
	Let me explain few things about my application. It has a thread
that waits for the request on TCP/IP socket with some port. When a request
comes from the client, it takes a thread from a thread pool (of size 40),
process the request and finally sends it back to the client. In each
thread (i.e.to process each request) the application has to go through the
given code. To enable multi threading, I am using -mt option to compile.

The SIZE of the application grows from 30 MB to 360 MB in 7 hours and after
that it crashes.

Best Regards,
Sridhar Gudipati
Xius India Ltd.
Hyderabad
mailto: sridhargudipati@xius.org
Contact:9440529896


-----Original Message-----
From: owner-cxx-dev@cxx.cup.hp.com
[mailto:owner-cxx-dev@cxx.cup.hp.com]On Behalf Of Dennis Handly
Sent: Wednesday, May 19, 2004 9:29 AM
To: cxx-dev@cxx.cup.hp.com
Subject: RE: CXX-DEV: Memroy Leak in an application using aCC ?!! (More
Information)


>From: "Sridhar Gudipati" <sridhargudipati@xius.org>
>Please following the following MLK(Memory Leak) statement from the
>purifier log for the Sample No.1 case. Let me know if I am wrong.

Ok, it says there is a leak.  But this is only where it was allocated,
not where it wasn't destroyed.

What are you doing with that string?  Are you putting it in a container?
Did you forget to declare a copy constructor for any of your classes??

>New memory leaked: 15055 bytes (0.211%); potentially leaked: 11212 bytes
>MLK: 11983 bytes leaked in 6 blocks
>  * Block of 2297 bytes (5 times); last block at 0x4115f270
>  * Block of 498 bytes at 0x40f37028
Sridhar Gudipati

This also indicates your strings on fairly long.
Also, do you know how many times you go through this code?
It's at least 6 times.

>From: owner-cxx-dev@cxx.cup.hp.com On Behalf Of Dennis Handly
>You need to prove it leaks by showing the leak detection tools output
>on small cases.

Do you have a small runnable example?  My test case doesn't leak.
Does your example create threads or is just compiled with -mt?
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE cxx-dev
 _________________________________________________________________
 _________________________________________________________________
 To leave this mailing list, send mail to majordomo@cxx.cup.hp.com
    with the message UNSUBSCRIBE cxx-dev
 _________________________________________________________________
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic