Indeed.
In general, it would be a very *bad* idea to have free move the break back.
System calls are not free, and the normal pattern of events for memory
allocation is such that space freed is likely to soon be reused or that
the process exits freeing all its resources. The usual implementation
means that most long running processes reach a "steady state" where they
don't have to move the break at all (unless they have one or more memory
leaks :-)
If you are in the situation of writing a program which you know requires
large memory allocations initially, but should *really* free them up
subsequently, you should create the code to do this (e.g. use mmap).
t
-- Tim Wright, Worldwide Technical Services, | Email: timw@sequent.com Sequent Computer Systems Inc., 15450, | SW Koll Parkway, Beaverton, Oregon 97006 | Phone: +1-503-578-3822 "Applying computer technology is simply finding the right wrench to pound in the correct screw"