- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Heap fragementation on HPUX
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
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
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
тАО06-30-2009 04:36 AM
тАО06-30-2009 04:36 AM
I tried wdb in BATCH mode with my process. But, it didnot detected any leaks. It produced only heap profile files.
Is there any way to find out that the wt=hether increase is due to fragmentation? Because lot of malloc are happening in my process.
Platform is HP-UX B.11.23 on HP itanium server. I can use wdb and glance tool(I only have working knowledge of both of these :( )
Also, considering the fact that memory increase is after 2-3 hr run how can i work with wdb in debugger mode. Means is it possible to automate printing the heap information and continuing from that point in gdb/wdb automatically?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 04:44 AM
тАО06-30-2009 04:44 AM
Re: Heap fragementation on HPUX
The heap (from 'malloc' and cousins) may grow, but it will not shrink. When 'malloc()'ed memory is 'free()'ed that memory is returned to the heap, but not to the system until the process terminates.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 04:47 AM
тАО06-30-2009 04:47 AM
Re: Heap fragementation on HPUX
Did you try my handy dandy memory leak detector?
http://www.hpux.ws/?p=8
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 04:50 AM
тАО06-30-2009 04:50 AM
Re: Heap fragementation on HPUX
Thanks for quick reply. But, how to ensure that there is no memory leak. Because, if i monitor process for say 7 hr or 8 hrs i can see some jumps of memory increase in 16kb chunks.
I have to prove that there is no memory leak but i cannot integrate with any tool like purify which need recompilation due to some techinal difficaulties
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 04:54 AM
тАО06-30-2009 04:54 AM
Re: Heap fragementation on HPUX
Your tool will tell which process is taking memory. I know there is an increase in memory of my process but i am not sure wether it is because of memory leak or something else
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-30-2009 03:27 PM
тАО06-30-2009 03:27 PM
Re: Heap fragementation on HPUX
(You don't care about Resident size, just the total size but I assume both are increasing.)
>it did not detected any leaks. It produced only heap profile files. ... Is there any way to find out that the whether increase is due to fragmentation?
Then you either have heap fragmentation or your heap usage is increasing. Did wdb say whether your heap allocation was increasing or just the arena and free areas? The latter is heap fragmentation. (Are you using threads?)
Fragmentation can also be detected by mallinfo(3).
>I only have working knowledge of both of these
Have you looked at the WDB document: Debugging dynamic memory usage errors using HP WDB
http://www.hp.com/go/wdb
>is it possible to automate printing the heap information and continuing from that point in gdb/wdb automatically?
You can also call mallinfo(3).
>I have to prove that there is no memory leak but I cannot integrate with any tool like purify which need recompilation
No need to use purify. wdb/mallinfo(3) will tell you if you have leaks but not where.
Also, whether you have a leak or heap fragmentation, the result is the same, except instead of blaming your application, you blame libc. :-) Or you need to change how you allocate space
You may want to use MallocNextGen:
http://h20392.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=MallocNextGen
It does a better job if you have threads.
>JRF: The heap may grow, but it will not shrink.
If Atul mentions "Heap fragmentation" he probably knows about this. He needs to look for zebras. ;-)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 12:27 AM
тАО07-01-2009 12:27 AM
Re: Heap fragementation on HPUX
you can also make tests with _M_SBA_OPTS env variable to test various sba configs.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 01:02 AM
тАО07-01-2009 01:02 AM
Re: Heap fragementation on HPUX
Thanks for the detailed information. But, when you say "Also, whether you have a leak or heap fragmentation, the result is the same" do you mean we cannot distinguish between the two. I hope there should be some way to distinguish between fragmentation and leak and i am looking for the same
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 01:05 AM
тАО07-01-2009 01:05 AM
Re: Heap fragementation on HPUX
Can you please more information regarding this "_M_SBA_OPTS" variable. Or can you point to some good links regarding this option
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО07-01-2009 01:06 AM
тАО07-01-2009 01:06 AM