Re: Proper Printf Format for Printing Physical Addresses on 32 and 64 bit Systems

From: Scott Long <scottl_at_samsco.org>
Date: Wed, 09 Jul 2008 21:50:30 -0600
David Christensen wrote:
> I have some debugging code in my network driver and I'd like
> to print out the physical address of a memory block.  What's
> the right way to use a printf() that works on both 32 and 64
> bit platforms?
> 
> Dave
> 
>

Cast it to a uintmax_t and use %ju or %jx

Scott
Received on Thu Jul 10 2008 - 01:50:35 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:32 UTC