Nikolay Igotti
ILP64, LP64, LLP64
One important platform feature, to be considered when writing portable 64-bit code is if it is LP64, LLP64 or ILP64. Those abbreviations stands for size in bits of basic C data types (int, long, void*, long long):
| Type | ILP64 | LP64 | LLP64 |
int | 64 | 32 | 32 |
long | 64 | 64 | 32 |
pointer | 64 | 64 | 64 |
long long | 64 | 64 | 64 |
Win64 is a LLP64 platform, while Solaris and Linux are LP64 platforms.
Thus the only safe way to store pointers in integer types is either always use uintptr_t
(defined in stdint.h not included at least with MSVC2003 and earlier), or always
use long long fields.
Posted at 10:32AM Jul 08, 2007 by nike in Sun | Comments[1]
Sunday Jul 08, 2007
More:
The forgotten problems of 64-bit programs development.
http://www.viva64.com/articles/Forgotten_problems.html
Posted by Andrew on February 25, 2008 at 09:10 AM MSK #