From owner-freebsd-arch@FreeBSD.ORG Fri Aug 13 15:19:19 2010 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E9E2A1065673; Fri, 13 Aug 2010 15:19:19 +0000 (UTC) (envelope-from jhb@FreeBSD.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id B9FA78FC12; Fri, 13 Aug 2010 15:19:19 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 63DA346B0D; Fri, 13 Aug 2010 11:19:19 -0400 (EDT) Received: from John-Baldwins-Macbook-Pro.local (75-48-78-116.lightspeed.cncrca.sbcglobal.net [75.48.78.116]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 51FB68A03C; Fri, 13 Aug 2010 11:19:17 -0400 (EDT) Message-ID: <4C656275.30201@FreeBSD.org> Date: Fri, 13 Aug 2010 11:19:17 -0400 From: John Baldwin User-Agent: Thunderbird 2.0.0.24 (Macintosh/20100228) MIME-Version: 1.0 To: mdf@FreeBSD.org References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 13 Aug 2010 11:19:17 -0400 (EDT) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-2.5 required=4.2 tests=AWL,BAYES_00,RDNS_DYNAMIC autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: freebsd-arch@freebsd.org Subject: Re: RFC: replace vm_offset_t with uintptr_t and vm_size_t with size_t X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 13 Aug 2010 15:19:20 -0000 mdf@FreeBSD.org wrote: > Looking over the arch-specific definitions, using uintptr_t and size_t > would not affect the actual width of these sizes. However, it would > simplify e.g. conformant printf(9) statements, since there is an > approved specifier for size_t and, while there isn't one for > uintptr_t, ptrdiff_t is pretty close (Bruce, is there a better > specifier)? > > Admittedly, this isn't the simplest of undertakings, as there are 590 > instances of vm_size_t in the FreeBSD source code and 3887 of > vm_offset_t. > > Has this proposal made the rounds before and been shot down for some reason? Hmm, I suspect vm_offset_t predates uintptr_t. I'm not sure the churn is really worth the effort involved especially as regards conflicts in future MFC's, etc. You also forgot vm_ooffset_t -> off_t. However, how often are vm_*_t values printed outside of temporary debug statements? They shouldn't be used in userland, so I'm not sure if there are enough printf() invocations to really justify the churn. -- John Baldwin