Bug 99231

Summary: [ PATCH ] malloc(3): options J and Z DOESN'T imply option R
Product: Documentation Reporter: Dan Lukes <dan>
Component: Books & ArticlesAssignee: Giorgos Keramidas <keramida>
Status: Closed FIXED    
Severity: Affects Only Me CC: keramida
Priority: Normal    
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Dan Lukes 2006-06-20 23:30:19 UTC
	The malloc(3) manual page claim the options 'J' and 'Z' imply 'R' option.

	It's not true (see grep malloc_realloc lib/libc/stdlib/malloc.c)

	Beware, it apply to RELENG-6 only, not CURRENT.

How-To-Repeat: 	N/A
Comment 1 Giorgos Keramidas freebsd_committer freebsd_triage 2006-06-21 00:42:55 UTC
State Changed
From-To: open->closed

Committed in revision 1.63.2.1 or file 
http://cvsweb.freebsd.org/src/lib/libc/stdlib/malloc.3,v 

Thanks :) 


Comment 2 Giorgos Keramidas freebsd_committer freebsd_triage 2006-06-21 00:42:55 UTC
Responsible Changed
From-To: freebsd-doc->keramida
Comment 3 matthieu 2007-09-03 23:53:05 UTC
hi,

if i'm correctly reading malloc source, the error reported in this old 
PR seems to also apply on RELENG_5 for quite a long time now, precisely 
since rev 1.80, ~4 years. diff with previous shows :

@@ -487,18 +490,11 @@ malloc_init ()
      if (malloc_zero)
  	malloc_junk=1;

-    /*
-     * If we run with junk (or implicitly from above: zero), we want to
-     * force realloc() to get new storage, so we can DTRT with it.
-     */
-    if (malloc_junk)
-	malloc_realloc=1;
-

whole diff here :
http://www.freebsd.org/cgi/cvsweb.cgi/src/lib/libc/stdlib/malloc.c.diff?r1=1.79;r2=1.80

(this has been pointed out by Laurent Le Brun <llb@etna-alternance.net>)