From owner-freebsd-arch@FreeBSD.ORG Sat Mar 25 18:56:13 2006 Return-Path: X-Original-To: freebsd-arch@FreeBSD.org Delivered-To: freebsd-arch@FreeBSD.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 65D1916A41F; Sat, 25 Mar 2006 18:56:13 +0000 (UTC) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (gate.funkthat.com [69.17.45.168]) by mx1.FreeBSD.org (Postfix) with ESMTP id EFC8B43D48; Sat, 25 Mar 2006 18:56:12 +0000 (GMT) (envelope-from jmg@hydrogen.funkthat.com) Received: from hydrogen.funkthat.com (m2eio4qwgoa7hdwh@localhost.funkthat.com [127.0.0.1]) by hydrogen.funkthat.com (8.13.4/8.13.3) with ESMTP id k2PIuCex039015; Sat, 25 Mar 2006 10:56:12 -0800 (PST) (envelope-from jmg@hydrogen.funkthat.com) Received: (from jmg@localhost) by hydrogen.funkthat.com (8.13.4/8.13.3/Submit) id k2PIuCB2039014; Sat, 25 Mar 2006 10:56:12 -0800 (PST) (envelope-from jmg) Date: Sat, 25 Mar 2006 10:56:12 -0800 From: John-Mark Gurney To: Jason Evans Message-ID: <20060325185612.GC7001@funkthat.com> Mail-Followup-To: Jason Evans , freebsd-arch@freebsd.org References: <44247DF1.8000002@FreeBSD.org> <200603250806.k2P86YJU011861@apollo.backplane.com> <4424FDE9.3080707@FreeBSD.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4424FDE9.3080707@FreeBSD.org> User-Agent: Mutt/1.4.2.1i X-Operating-System: FreeBSD 5.4-RELEASE-p6 i386 X-PGP-Fingerprint: B7 EC EF F8 AE ED A7 31 96 7A 22 B3 D8 56 36 F4 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html Cc: freebsd-arch@FreeBSD.org Subject: Re: Proposed addition of malloc_size_np() X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: John-Mark Gurney List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 25 Mar 2006 18:56:13 -0000 Jason Evans wrote this message on Sat, Mar 25, 2006 at 00:23 -0800: > have to store the precise allocation request size; it can instead round > the request size up internally, then treat the allocation as being of > this rounded up size. By vaguely specifying the return value of > malloc_size_np(), we grant the malloc implementation freedom as to > whether the size is precisely what was specified during allocation, or > some rounded up value. > > I had no intention of suggesting that malloc_size_np() should extend > existing allocations, nor change the return value depending on the > current state of memory following the allocation pointed to by ptr. Ok, so what you are saying is that the function returns the size of the bucket (if any) that the memory was allocated from... But even though this function may return a larger value, the program is not allowed to use extra space, and it's only useful for further allocations of the same size? -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not."