Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!burl!ulysses!harpo!decvax!mcnc!idis!dan From: dan@idis.UUCP (Dan Strick) Newsgroups: net.unix-wizards,net.eunice Subject: Re: Bizzare Bourne Shell (well, not really) Message-ID: <284@idis.UUCP> Date: Wed, 16-May-84 22:55:08 EDT Article-I.D.: idis.284 Posted: Wed May 16 22:55:08 1984 Date-Received: Fri, 18-May-84 00:50:57 EDT References: <1820@sdccsu3.UUCP> intelca.263 Lines: 32 I looked up the V6, V7, and 4.0bsd (~32V) manual pages for the break system call and found that all mention the fact that the break address is rounded up and none mention the fact that new memory is cleared. I assume the unix support group changed the manual page to eliminate a machine dependency (the rounding) and to make the documentation more complete (clearing new memory). These kind of changes to documentation are always good. Right? Wrong! New memory is cleared not so much to save the programmer the trouble of clearing it explicitly but to avoid apparently randomly malfunctioning programs and possibly as a slightly paranoid security measure. It would have made as much sense to set new virtual memory locations to -1. Some features are best left undocumented or hidden in a footnote. (especially obviously implementation dependent features) The old manual pages give the rules for rounding up break addresses on each of the various machines that unix ran on at the time that those old versions of unix were released. This had to go, but it would have made sense to mention that the system did not always take requested break addresses literally. Some features are best left documented. (especially when omission is misleading) My opinions: the unix implementation of the brk() system call is correct. Recent documentation (i.e. system 5) may be misleading (so much for professionally designed user friendly documentation). The Bourne shell implementation (which motivated the tirade about the unix brk() implementation) is sick. It breaks all the rules. Worse: it uses longjumps. Dan Strick [decvax|mcnc]!idis!dan