HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- std::list memory leak when compiling with HPUX aCC...
Operating System - HP-UX
1827794
Members
2897
Online
109969
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-10-2003 07:52 AM
10-10-2003 07:52 AM
std::list memory leak when compiling with HPUX aCC -AA
Hi,
I am having a problem that appears to be HPUX/RogueWave specific.
My code is displaying a huge memory leak when compiled on 11.00 HPUX(PA-RISC 2.0) using the aCC -AA flag. On the order of 2500 kbytes per hour are leaking while processing only 7-10 calls per second. A higher rate of calls translates to more memory leaked. This does not appear to be leaking on NT, LINUX, Solaris, or HPUX without the -AA flag. I came across some interesting (ok scarey) information regarding memory leaks in the HPUX std::list<...> container. I have compiled and executed the following test code with the -AA option and verified that this does in fact leak on our system. Considering that our code dies in an area that heavily relys on std::list and that a non-AA version does not leak, I am leaning towards this as being our culprit.
#include "stdio.h"
#include "stdlib.h"
#include "malloc.h"
#include
I am having a problem that appears to be HPUX/RogueWave specific.
My code is displaying a huge memory leak when compiled on 11.00 HPUX(PA-RISC 2.0) using the aCC -AA flag. On the order of 2500 kbytes per hour are leaking while processing only 7-10 calls per second. A higher rate of calls translates to more memory leaked. This does not appear to be leaking on NT, LINUX, Solaris, or HPUX without the -AA flag. I came across some interesting (ok scarey) information regarding memory leaks in the HPUX std::list<...> container. I have compiled and executed the following test code with the -AA option and verified that this does in fact leak on our system. Considering that our code dies in an area that heavily relys on std::list and that a non-AA version does not leak, I am leaning towards this as being our culprit.
#include "stdio.h"
#include "stdlib.h"
#include "malloc.h"
#include
using namespace std;
template class list
int main (int argc, char *argv[])
{
list
char c='r';
do
{
for ( int j = 0; j < 99999 ; j++ )
{
list_int.push_back(2);
list_int.pop_front();
}
printf ( "\nPress r to repeat, q to exit\n=>" );
c = getchar ();
}
while ( c != 'q' );
return 0;
}
If I debug the test code above and allow the process to run out of memory I get the following core:
(gdb) where
#0 0x4b68 in std::list
#aggretxform#77=@0x7f7f0950,
__it={
at /opt/aCC/include_std/list:911
#1 0x4404 in main (argc=1, argv=0x7f7f076c) at leakcode.cpp:18
(gdb) display this
2: this = (class std::list
Unfortunately std::list is used throughout our code. Has anyone run into this problem or know anybody that has? If so could you please let me know if you have heard of a fix, patch, or work-around. Any help would be greatly appreciated.
Regards,
Jeremy
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-12-2003 09:11 PM
10-12-2003 09:11 PM
Re: std::list memory leak when compiling with HPUX aCC -AA
Hi
I've tried your code and it runs smoothly for me.
I don't think it matters, but:
#include "stdio.h"
#include "stdlib.h"
#include "malloc.h"
should be rather:
#include
#include
#include
as you want system headers.
By the way: you did link also with -AA?
Good luck
Adam
I've tried your code and it runs smoothly for me.
I don't think it matters, but:
#include "stdio.h"
#include "stdlib.h"
#include "malloc.h"
should be rather:
#include
#include
#include
as you want system headers.
By the way: you did link also with -AA?
Good luck
Adam
I do everything perfectly, except from my mistakes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-14-2003 06:02 AM
10-14-2003 06:02 AM
Re: std::list memory leak when compiling with HPUX aCC -AA
Hi Adam,
We think we need the following patch to solve this problem.
http://itrc.hp.com/service/patch/patchDetail.do?patchid=PHSS_26946
Could you tell me what version compiler you are using and whatever else you can about your patch level? We are currently using aCC 3.30 and can upgrade to 3.31 for free. If this does not work however, we must purchase a new comiler (aCC v3.37) in order to apply the above patch.
Thanks,
Jeremy
We think we need the following patch to solve this problem.
http://itrc.hp.com/service/patch/patchDetail.do?patchid=PHSS_26946
Could you tell me what version compiler you are using and whatever else you can about your patch level? We are currently using aCC 3.30 and can upgrade to 3.31 for free. If this does not work however, we must purchase a new comiler (aCC v3.37) in order to apply the above patch.
Thanks,
Jeremy
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-16-2003 05:41 AM
10-16-2003 05:41 AM
Re: std::list memory leak when compiling with HPUX aCC -AA
Hi Jeremy
Sorry for delay - tough week at work.
aCC -V
aCC: HP ANSI C++ B3910B A.03.37
Unluckilly I'm not very familiar with patches.
Good luck
Adam
Sorry for delay - tough week at work.
aCC -V
aCC: HP ANSI C++ B3910B A.03.37
Unluckilly I'm not very familiar with patches.
Good luck
Adam
I do everything perfectly, except from my mistakes
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Support
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP