Re: writing to freed memory--issues
- From: Joe Pfeiffer <pfeiffer@xxxxxxxxxxx>
- Date: 29 Mar 2006 08:14:19 -0700
Kasper Dupont <31026663590054698937@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> writes:
"Chris F.A. Johnson" wrote:
To get leading zeros:
printf("%010p\n",main); /* 10 places to allow for 0x */
This result in a compiler warning, but it seems to work.
Still doesn't do what I want: it prints a null pointer as (nil). I
use 0x%08x to print pointers, so it always comes out as an eight digit
hex number, with a leading 0x to tell the reader it's hexadecimal.
Yes, when I move on to 64 bits some day it's going to break...
--
Joseph J. Pfeiffer, Jr., Ph.D. Phone -- (505) 646-1605
Department of Computer Science FAX -- (505) 646-1002
New Mexico State University http://www.cs.nmsu.edu/~pfeiffer
.
- References:
- writing to freed memory--issues
- From: bill pursell
- Re: writing to freed memory--issues
- From: bill pursell
- Re: writing to freed memory--issues
- From: Måns Rullgård
- Re: writing to freed memory--issues
- From: Chris F.A. Johnson
- writing to freed memory--issues
- Prev by Date: Re: Strange pager (less, more) behavior
- Next by Date: Re: what's the relation among wxWidgets,xWindows and GTK+?
- Previous by thread: Re: writing to freed memory--issues
- Next by thread: Re: writing to freed memory--issues
- Index(es):