Unix Technical Forum

what does 'top' actually show ?

This is a discussion on what does 'top' actually show ? within the comp.unix.solaris forums, part of the Solaris Operating System category; --> Hello All, A simple test app allocates and releases memory in an endless loop. 'top' shows that application acquires ...


Go Back   Unix Technical Forum > Unix Operating Systems > Solaris Operating System > comp.unix.solaris

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 05-13-2008, 06:08 PM
Alona
 
Posts: n/a
Default what does 'top' actually show ?

Hello All,

A simple test app allocates and releases memory in an endless loop.
'top' shows that application acquires memory, but never releases it.
It looks like certain amount of memory is reserved by the
application.

How should 'top' memory readings be interpreted?

Thanks,
Alona
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-13-2008, 06:08 PM
Dave Uhring
 
Posts: n/a
Default Re: what does 'top' actually show ?

On Mon, 12 May 2008 09:28:27 -0700, Alona wrote:

> A simple test app allocates and releases memory in an endless loop.
> 'top' shows that application acquires memory, but never releases it. It
> looks like certain amount of memory is reserved by the application.


What does 'prstat -a' tell you about memory usage?

> How should 'top' memory readings be interpreted?


With toilet paper.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-13-2008, 06:09 PM
Wayne
 
Posts: n/a
Default Re: what does 'top' actually show ?

Alona wrote:
> Hello All,
>
> A simple test app allocates and releases memory in an endless loop.
> 'top' shows that application acquires memory, but never releases it.
> It looks like certain amount of memory is reserved by the
> application.
>
> How should 'top' memory readings be interpreted?
>
> Thanks,
> Alona


The numbers are probably correct. Most dynamic memory is taken
from the heap, and a certain amount of that is reserved by
the app when it starts. When an app requests memory, if there
isn't enough in the heap the malloc (or whatever) library
will request more from the OS, growing the heap.

When the app "free"s memory, it is restored to the heap but
not back to the OS pool. So when your app requests memory
you may see the amount of used memory increase in the top
output. When your app frees memory, it still is held by
the app, and top doesn't see the memory use decrease.

-Wayne
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:21 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
www.UnixAdminTalk.com