From nobody@FreeBSD.org  Thu Oct 18 15:12:15 2001
Return-Path: <nobody@FreeBSD.org>
Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21])
	by hub.freebsd.org (Postfix) with ESMTP id 683B337B401
	for <freebsd-gnats-submit@FreeBSD.org>; Thu, 18 Oct 2001 15:12:14 -0700 (PDT)
Received: (from nobody@localhost)
	by freefall.freebsd.org (8.11.4/8.11.4) id f9IMCE694618;
	Thu, 18 Oct 2001 15:12:14 -0700 (PDT)
	(envelope-from nobody)
Message-Id: <200110182212.f9IMCE694618@freefall.freebsd.org>
Date: Thu, 18 Oct 2001 15:12:14 -0700 (PDT)
From: SUZUKI Koichi <koich@cac.co.jp>
To: freebsd-gnats-submit@FreeBSD.org
Subject: malloc.3: malloc(3) and calloc(3) don't free memory, do they?
X-Send-Pr-Version: www-1.0

>Number:         31365
>Category:       docs
>Synopsis:       malloc.3: malloc(3) and calloc(3) don't free memory, do they?
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-doc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          doc-bug
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 18 15:20:01 PDT 2001
>Closed-Date:    Sun Nov 4 16:39:30 PST 2001
>Last-Modified:  Sun Nov 04 16:39:37 PST 2001
>Originator:     SUZUKI Koichi
>Release:        FreeBSD 4.4-stable
>Organization:
FreeBSD Japanese Manual Translation Project
>Environment:
>Description:


According to the man page of malloc.3 (rev 1.25.2.12):

---
DIAGNOSTIC MESSAGES
     :
The following is a brief description of possible warning messages and
 their meanings:
     :
pointer to wrong page  The pointer that malloc() or calloc() is trying
 to free does not reference a possible page.---
This warning message is output by irealloc() and free_pages() in malloc.c, and these two functions are called by realloc(), free() and reallocf().
(I'm looking src/lib/libc/stdlib/malloc.c,v 1.49.2.3
         and src/lib/libc/stdlib/reallocf.c,v 1.3)




>How-To-Repeat:

>Fix:
--- malloc.3.org        Thu Oct 18 14:09:23 2001
+++ malloc.3    Thu Oct 18 14:19:36 2001
@@ -420,9 +420,10 @@
 has been modified.
 .It "pointer to wrong page"
 The pointer that
-.Fn malloc
+.Fn realloc ,
+.Fn free
 or
-.Fn calloc
+.Fn reallocf
 is trying to free does not reference a possible page.
 .It "recursive call"
 A process has attempted to call an allocation function recursively.


>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->closed 
State-Changed-By: dd 
State-Changed-When: Sun Nov 4 16:39:30 PST 2001 
State-Changed-Why:  
Applied, thanks! 

http://www.FreeBSD.org/cgi/query-pr.cgi?pr=31365 
>Unformatted:
