From: utzoo!decvax!harpo!utah-cs!utah-gr!thomas Newsgroups: net.unix-wizards Title: Re: compaction using realloc Article-I.D.: utah-gr.663 Posted: Mon Dec 13 10:23:15 1982 Received: Tue Dec 14 05:13:46 1982 References: sri-unix.4783 I have a version of malloc (which I got from somebody else) which we are using on our Vaxen now. It satisfies all memory requests by allocating a block which is the next power of 2 bigger than the request. This allows it to keep separate free lists for each size of request, making malloc() much faster on a paging machine (it only needs to keep 29 free lists, most of which are never used). Obviously it depends on the fact that memory is cheap on a Vax. We have a program which used to go into horrendous thrashing as soon as its data space size reached the amount of real memory on the system, do to the standard malloc's behaviour of searching all blocks to find a free one. Our malloc also has a little instrumentation built into it, so you can easily find "hardening of the arteries" if you are interested. I have permission from the author to distribute it, if anybody is interested, drop me a line. =Spencer (harpo!utah-cs!thomas, thomas@utah-20)