[VPM] deallocating memory of multi-threaded server while IDLE.

Peter Scott Peter at PSDT.com
Wed Feb 11 14:50:08 CST 2004


At 12:27 PM 2/11/2004 -0800, abez wrote:

>You really should test the behaviour. The task managers et al. are not
>very reliable to actually tell if you're going to run out of memory.
>I suggest turning off swap and then seeing how many processes w/ their
>threads you can add.
>
>Add processes when it looks like there is no memory left. The OS will
>probably come by and reclaim some memory from the other processes.

Real memory, right?  The virtual memory allocation can't go down, can it?

>abram
>
>On Wed, 11 Feb 2004, Eric wrote:
>
> > Peter,
> >
> > Is this more connected with the Kernel or with POSIX compliance? I 
> know that the Kernel is responsible for supporting/implementing 
> POSIX, but is it the support of POSIX that causes the problem or is it
> > a not related Kernel issue?  I wonder because I have heard that 
> same phrase in reference to this discussion before about "Unix and 
> its variants" Common thread that I know of in that case is POSIX

My understanding was that it was just the way things were commonly 
implemented.  Stevens in APUE says "Although sbrk can expand or 
contract the memory of a process, most versions of malloc and free 
never decrease their memory size.  The space that we free is available 
for a later allocation, but the freed space is not returned to the 
kernel - it is kept in the malloc pool."

Hmm.  I guess a better memory management library could decrease process 
footprint...


-- 
Peter Scott
Pacific Systems Design Technologies
http://www.perldebugged.com/
*** New! *** http://www.perlmedic.com/




More information about the Victoria-pm mailing list