HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Howz Memory management in HP-UX
Operating System - HP-UX
1829093
Members
2435
Online
109986
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
03-30-2009 03:03 AM
03-30-2009 03:03 AM
Howz Memory management in HP-UX
Any body can answer memory allocation strategy on hp-ux. I able to see the below behaviour on hp-parisc 11.11. I am using g++ compiler.
1.) Memory is allocated (malloc) and cleared (free). If you now take a look at the memory usage of the process the whole memory allocated is still in use of the process. The memory doesn't seem free.
2.) If I allocate and free the same amount of memory always the memory used by the process increases once and stays stable afterwards.
3.) If I change the allocation size every time the memory usage is always increasing.
1.) Memory is allocated (malloc) and cleared (free). If you now take a look at the memory usage of the process the whole memory allocated is still in use of the process. The memory doesn't seem free.
2.) If I allocate and free the same amount of memory always the memory used by the process increases once and stays stable afterwards.
3.) If I change the allocation size every time the memory usage is always increasing.
- Tags:
- malloc
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2009 03:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2009 03:58 AM
03-30-2009 03:58 AM
Re: Howz Memory management in HP-UX
Hi:
This behavior is what you would expect to see. The "heap" is the process's memory pool. Calls to 'malloc()' and its cousins add to the heap up to the 'maxdsiz' kernel limit for a process. A 'free()' deducts the allocated memory from the heap but does not disassociate the memory from the process as long as the process is running.
For a 32-bit process, the kernel's 'maxdsiz' defines the maximum size to which the head can grow. For a 64-bit process, the 'maxdsiz_64bit' parameter controls the size. The "d" denotes "data" as opposed to the stack or the program text (instructions). These too have limitations; the 'maxssiz' and 'maxssiz_64bit' for the stack; the 'maxtsiz' and 'maxtsiz_64bit' for text.
Regards!
...JRF...
This behavior is what you would expect to see. The "heap" is the process's memory pool. Calls to 'malloc()' and its cousins add to the heap up to the 'maxdsiz' kernel limit for a process. A 'free()' deducts the allocated memory from the heap but does not disassociate the memory from the process as long as the process is running.
For a 32-bit process, the kernel's 'maxdsiz' defines the maximum size to which the head can grow. For a 64-bit process, the 'maxdsiz_64bit' parameter controls the size. The "d" denotes "data" as opposed to the stack or the program text (instructions). These too have limitations; the 'maxssiz' and 'maxssiz_64bit' for the stack; the 'maxtsiz' and 'maxtsiz_64bit' for text.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-30-2009 04:22 AM
03-30-2009 04:22 AM
Re: Howz Memory management in HP-UX
As JRF has indicated, this is exepected behaviour - it's done as a perfromance trade-off, in that the performance cost of releasing and re-organising memory to avoid hideously complex fragmentation is usually more expensive that just holding on to the memory.
Don't worry though, if your process ever comes under severe memory pressure, then vhand will be picking out those pages in the heap which have been released by the program through a call to free as candidates for page-out. So when the system gets under memory pressure, you do get vthat memory back.
Is this actually a problem for you? Or just an observation?
HTH
Duncan
I am an HPE Employee
Don't worry though, if your process ever comes under severe memory pressure, then vhand will be picking out those pages in the heap which have been released by the program through a call to free as candidates for page-out. So when the system gets under memory pressure, you do get vthat memory back.
Is this actually a problem for you? Or just an observation?
HTH
Duncan
I am an HPE Employee

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
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP