Date: Fri, 13 Aug 2010 11:19:17 -0400 From: John Baldwin <jhb@FreeBSD.org> To: mdf@FreeBSD.org Cc: freebsd-arch@freebsd.org Subject: Re: RFC: replace vm_offset_t with uintptr_t and vm_size_t with size_t Message-ID: <4C656275.30201@FreeBSD.org> In-Reply-To: <AANLkTik_2pXA1LP9dq-iOLkFrQBG7jP=4yUXBjtDOBF3@mail.gmail.com> References: <AANLkTik_2pXA1LP9dq-iOLkFrQBG7jP=4yUXBjtDOBF3@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4C656275.30201>