This is an old revision of this page, as edited by BlakeCS (talk | contribs) at 20:19, 6 January 2007. The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.
Revision as of 20:19, 6 January 2007 by BlakeCS (talk | contribs)(diff) ← Previous revision | Latest revision (diff) | Newer revision → (diff)0xFDFDFDFD is a number written in hexadecimal notation, with the decimal value of 4261281277, with the octal value of 37577376775, and with the binary value of 11111101111111011111110111111101.
Hexadecimal notation is often used to display or transcribe values stored in computer memory. Most numbers, when displayed in hexadecimal, are uninteresting and not eyecatching. Sometimes, however, a sentinel value is desired that will be easily recognizable when displayed in hexadecimal (for instance, during debugging, or in a log file) yet are unlikely to occur in normal operation of the program. 0xFDFDFDFD is sometimes chosen as such a sentinel value so that programmers can recognize this value during programming or debugging. It has no specific meaning, and another recognizable number, such as 0xABABABAB or 0xCAFEFEED, would suffice.
Since it is unlikely that any given 32-bit integer would take this specific value (one chance out of 2=4294967296), programmers often use this magic value to investigate common errors such as buffer overflows, or uninitialized variables, when using a debugger. For instance, whenever this value appears in a memory dump, its location is likely to be a point of interest for the programmer. Another example of its possible usage is to initialize various memory locations which programs are not supposed to access, making it easier to detect invalid code execution.
0xFDFDFDFD was used by Microsoft's C++ debugging heap to mark "no man's land" guard bytes before and after allocated heap memory.
This computing article is a stub. You can help Misplaced Pages by expanding it. |