Venkat,

When malloc is called, if there is not enough ADDRESS space for the
allocation, sbrk/brk is called to increase the address space.
So the Virtual size increases.

Solaris is a demand paged system. When the for mentioned address
space is touched, a page fault occurs and RAM is assocuated with the
page. The RSS increases.

When free is called the
address space is available in the malloc "arena". The RAM is still
associated with the page.

If the system gets low on memory, then the page scanner runs and if the
aforementioned page is not being used in a timely manner, 
then it is paged out and the RAM becomes available. The RSS shrinks.

If you want a different algorithm try libmapmalloc.

man mapmalloc.

But be warned, the minor page faults may increase significantly.

rick


On Fri, Mar 13, 2009 at 12:25:04PM -0700, venkat wrote:
> Subject: Re: [dtrace-discuss] Memory usage for C++ Application is growing
> Hi all,
>     thanks for ur response ,
> 
> as mention sanjeev mention  findleaks.pl   is showing good report and 
> 
> one more thing i want ask here is about lazy deallocation in solaries ,
> 
> memory allocated for local variables  the memory usage is increasing , but 
> after  scope of variable gone , still memory usage for binary is same. 
> 
> why its not coming back to intial memeory usage point . 
> 
> can any body explan ?
> 
> 
> Thanks,
>  Venkat
> 
> 
> Thanks ,
>   Venkat
> -- 
> This message posted from opensolaris.org
> _______________________________________________
> dtrace-discuss mailing list
> dtrace-discuss@opensolaris.org

-- 

Rickey C. Weisner 
Software Development and Performance Specialist 
Principal Field Technologist
Systems Quality Office
cell phone: 615-308-1147
email: rick.weis...@sun.com
_______________________________________________
dtrace-discuss mailing list
dtrace-discuss@opensolaris.org

Reply via email to