Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 12 Nov 2001 15:05:03 +1100 (EST)
From:      Andrew <andrew@ugh.net.au>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   docs/31925: Be a bit more descriptive about realloc's usage
Message-ID:  <20011112040503.CC954A842@starbug.ugh.net.au>

next in thread | raw e-mail | index | archive | help

>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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20011112040503.CC954A842>