From owner-freebsd-arch Sat Sep 1 0:28:11 2001 Delivered-To: freebsd-arch@freebsd.org Received: from mail.chem.msu.ru (mail.chem.msu.ru [195.208.208.19]) by hub.freebsd.org (Postfix) with ESMTP id 2846037B406; Sat, 1 Sep 2001 00:28:04 -0700 (PDT) Received: from comp.chem.msu.su ([158.250.32.97]) by mail.chem.msu.ru with SMTP (Microsoft Exchange Internet Mail Service Version 5.5.2650.21) id Q5PY2NCA; Sat, 1 Sep 2001 11:17:56 +0400 Received: (from yar@localhost) by comp.chem.msu.su (8.11.1/8.11.1) id f817S1x40110; Sat, 1 Sep 2001 11:28:01 +0400 (MSD) (envelope-from yar) Date: Sat, 1 Sep 2001 11:28:01 +0400 From: Yar Tikhiy To: arch@freebsd.org, doc@freebsd.org Subject: brk(2) manpage seems erroneous and confusing Message-ID: <20010901112800.A26502@comp.chem.msu.su> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Hi there, A friend of mine who is a Unix newbie tried to study various ways of memory allocation, and got confused by the brk(2) page. I read it and became confused either. The current version of the page contains a number doubtful and ambiguous statements. I've found at least six of them: - brk() should return int, not char* - it's a problem of our unistd.h, too - the break isn't the lowest address of the process' data segment - the statement on "data addressing" is likely to be interpreted that one may address memory only between the break and the stack pointer - sbrk() isn't described at all - char* functions are said to return ints - actually, sbrk() returns not new, but prior break value Despites the page is of little use to programmers now, it has certain historical value for those who wish to know how Unix developed. I'd suggest taking the brk(2) page from NetBSD, which language looks much better. If noone minds, I'll do that. Of course, I'll change the function prototypes in the manpage to match our unistd.h unless we decide to fix the latter, too. -- Yar To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message