Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!julius.cs.uiuc.edu!apple!uokmax!munnari.oz.au!brolga!ggm From: ggm@brolga.cc.uq.oz.au (George Michaelson) Newsgroups: comp.unix.internals Subject: whay can't processes shrink as well as grow? Message-ID: <1990Oct3.225943.4691@brolga.cc.uq.oz.au> Date: 3 Oct 90 22:59:43 GMT Organization: Prentice Computer Centre, The University of Queensland, Australia. Lines: 21 My understanding is that existing brk/sbrk/malloc in generic *nix doesn't allow the process to shrink again once mem has been allocated. Could somebody explain to a non-wizard what stops some method being used to detect free mem pages or compress the heap such that memory CAN be freed? I dont mean "for free" ie explain what would have to be different in HOW malloc/alloc/sbrk/free work to get this behaviour. I'm expecting to be told that keeping back-pointers to entities using allocated memory so you could dynamically update their position if you'd compressed the heap is more pain than it's worth. If thats not the case, I see some attractive uses of grabbing 5-10 Mb of space, using it and then releasing it without having to exit. -George -- G.Michaelson Internet: G.Michaelson@cc.uq.oz.au Phone: +61 7 377 4079 Postal: George Michaelson, Prentice Computer Centre The University of Queensland, St Lucia, QLD Australia 4067.