tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* SUMMARY: Memory Management
@ 2000-11-17 14:52 Nikola Milutinovic
  0 siblings, 0 replies; only message in thread
From: Nikola Milutinovic @ 2000-11-17 14:52 UTC (permalink / raw)
  To: tru64-unix-managers

Thanks to:

Fergus Donohue <Fergus.Donohue@dcu.ie>

who pointed out that he had solved those problems with GNU version of
malloc library.

Robert Mulley <robert@gnsconsulting.com.au>
"Dr. Tom Blinn, 603-884-0646" <tpb@doctor.zk3.dec.com>

Both pointed out something that should have been obvious to me, malloc
is using "sbrk()" system call to increase address space of the process.
In order to make things more efficient, "free()" is no longer returning
the memory it claimed in "malloc()", in case there is another "malloc()"
afterwards.

This is a feature, not a bug, we have to live with it.

There could be engineered hypothetical situations where this feature
would be unwanted, in my opinion. Take a process that has several
instances running and that has light-weight memory usage, but
occasionally has an excessive memory allocation. After a while all of
those processes will have their memory space size nailed to their MAX,
with no apparent need. Of course this can be avoided in anumber of ways
(manually reclaim memory, have those processes live shorter, etc.).

I guess the news is not really that disturbing, but I believe it ca
cause problems. Fergus reported he had to switch to GNU malloc because
SQUID was running out memory.

Thanks to all who replied.

Nix.
--  
... You have the right to remain silent. USE IT!

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2000-11-17 14:52 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2000-11-17 14:52 SUMMARY: Memory Management Nikola Milutinovic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox