HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- top command in HP-UX
Operating System - HP-UX
1832154
Members
3504
Online
110038
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
09-08-2001 02:16 AM
09-08-2001 02:16 AM
top command in HP-UX
Hi,
Does "top " shows the decrease in memory used
by a process. ?
I will escribe the problem we faced in detail.
-----------------------------------------
Problem observed :we created a program which
allocates and deallocates memory in larger chunks. (in HP-UX 10.0 ).
Monitored the excution of the program through
top.
Top showed the increase in memory usage by the program, when program was collecting memory.
But when program released the acquired memory , top continued to show the old memory usage only. That is top never reported
the decrease in memory usage by the program.
Later we checked the program with purify.5.0.1 tool for mem leaks but it showed no mem-leaks.
In short , my doubt is regarding the capability of "top " command to show the Decrease in used mem size in the RES field.
Thanks in advance,
harida
Does "top " shows the decrease in memory used
by a process. ?
I will escribe the problem we faced in detail.
-----------------------------------------
Problem observed :we created a program which
allocates and deallocates memory in larger chunks. (in HP-UX 10.0 ).
Monitored the excution of the program through
top.
Top showed the increase in memory usage by the program, when program was collecting memory.
But when program released the acquired memory , top continued to show the old memory usage only. That is top never reported
the decrease in memory usage by the program.
Later we checked the program with purify.5.0.1 tool for mem leaks but it showed no mem-leaks.
In short , my doubt is regarding the capability of "top " command to show the Decrease in used mem size in the RES field.
Thanks in advance,
harida
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2001 10:31 AM
09-08-2001 10:31 AM
Re: top command in HP-UX
Harida,
When memory is allocated to a program, even though the program may later deallocate it, the memory is still assigned to the program. Future requests for memory will be assigned from this free space . So in other words, once memory is assigned to a program, that memory is considered unavailable until the program ceases to exist.
Hope this helps.
-Santosh
When memory is allocated to a program, even though the program may later deallocate it, the memory is still assigned to the program. Future requests for memory will be assigned from this free space . So in other words, once memory is assigned to a program, that memory is considered unavailable until the program ceases to exist.
Hope this helps.
-Santosh
Life is what's happening while you're busy making other plans
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-08-2001 01:33 PM
09-08-2001 01:33 PM
Re: top command in HP-UX
Hi:
I assume you are using malloc(), calloc(), realloc(), and free(). In that case, memory areas supplied as arguments to free() are put back on the heap
for use by the same process. The memory is not returned to the OS. However, there is a method which will return memory to the OS, you can call sbrk() with a negative value to shrink a program's data segment. This method is not for the faint of heart. You will have to take over all responsibilty for memory management and use the brk() and sbrk() system calls.
Regards, Clay
I assume you are using malloc(), calloc(), realloc(), and free(). In that case, memory areas supplied as arguments to free() are put back on the heap
for use by the same process. The memory is not returned to the OS. However, there is a method which will return memory to the OS, you can call sbrk() with a negative value to shrink a program's data segment. This method is not for the faint of heart. You will have to take over all responsibilty for memory management and use the brk() and sbrk() system calls.
Regards, Clay
If it ain't broke, I can fix that.
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