>> It would be cool to be able to get a handle on being able to shrink
>> the memory occupied by an application dynamically. Malloc (through
>> brk()) grows the memory footprint, but free does not shrink it.
>> The same is true for the stack. Once allocated, it doesn't get freed
>> until the process exits.
>
> yes it would. does plan 9 have programs that could make use of this
> currently?
No, and it would be hard to do it because you'd need ways to compact
fragmented memory after a lot of mallocs and frees. And then, you'd
need a way to fix the pointers after compacting.
Sape