From owner-freebsd-doc Sun Nov 11 20:10: 7 2001 Delivered-To: freebsd-doc@freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 7823137B41B for ; Sun, 11 Nov 2001 20:10:01 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id fAC4A0q13834; Sun, 11 Nov 2001 20:10:00 -0800 (PST) (envelope-from gnats) Received: from starbug.ugh.net.au (starbug.ugh.net.au [203.31.238.37]) by hub.freebsd.org (Postfix) with ESMTP id 6D1A937B405 for ; Sun, 11 Nov 2001 20:05:06 -0800 (PST) Received: by starbug.ugh.net.au (Postfix, from userid 1000) id CC954A842; Mon, 12 Nov 2001 15:05:03 +1100 (EST) Message-Id: <20011112040503.CC954A842@starbug.ugh.net.au> Date: Mon, 12 Nov 2001 15:05:03 +1100 (EST) From: Andrew Reply-To: Andrew To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.113 Subject: docs/31925: Be a bit more descriptive about realloc's usage Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 31925 >Category: docs >Synopsis: Be a bit more descriptive about realloc's usage >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Sun Nov 11 20:10:00 PST 2001 >Closed-Date: >Last-Modified: >Originator: Andrew >Release: FreeBSD 4.4-STABLE i386 >Organization: UgH! >Environment: System: FreeBSD starbug.ugh.net.au 4.4-STABLE FreeBSD 4.4-STABLE #3: Sun Oct 7 21:30:09 EST 2001 andrew@starbug.ugh.net.au:/usr/obj/usr/src/sys/STARBUG i386 >Description: The existing malloc(3) page doesn't make it clear that realloc may return a pointer to a completely different memory block than the one passed to it. I hope this patch makes things a bit clearer for people programming while tired ;) >How-To-Repeat: >Fix: --- malloc.3.orig Sun Nov 11 08:46:56 2001 +++ malloc.3 Sun Nov 11 08:53:25 2001 @@ -115,6 +115,9 @@ the memory referenced by .Fa ptr is valid and unchanged. +If memory can be allocated a pointer to this memory is returned. Note this +pointer may be different to the value passed as +.Fa ptr . If .Fa ptr is >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message