From: utzoo!decvax!harpo!seismo!hao!hplabs!sri-unix!gwyn@Brl Newsgroups: net.unix-wizards Title: Re: compaction using realloc Article-I.D.: sri-unix.4941 Posted: Tue Dec 28 02:23:06 1982 Received: Wed Dec 29 04:32:17 1982 From: Doug Gwyn Date: 18 Dec 82 17:00:58-EST (Sat) Some years ago I implemented the first-fit allocation method using a "roving" search-start pointer as you mentioned, along with combining adjacent freed regions (identifiable because of "boundary tags") during allocation searching. The application was display processor real-time segment management, and it worked well. One drawback to the "boundary-tag" approach is that it assumes there is no memory in the pool other than that allocated through this package. This is NOT the case with the "malloc" scheme, whereby a user can increase the program break directly without breaking malloc's operation. I have tried to think of ways of permitting fake "busy block" boundary tags for uncontrolled heap space, but I couldn't think of anything reasonable to do about it. So malloc is still a sensible choice.