Compare And Set 64 bit
-
On most 32 bit systems bit 1 and 2 are not used in an address. This allows the CAS algorithm to test an address and also test a flag (very useful for non blocking linked lists). However on a 64 bit system those 2 bit are in use. After doing some googling I have found that AMD64 and IA64 use 48 bits. AMD plans to extend that 52 bits. So my question is, Am I safe to use bit 1 of a 64 bit address, if so will it be portable?
Waldermort
-
On most 32 bit systems bit 1 and 2 are not used in an address. This allows the CAS algorithm to test an address and also test a flag (very useful for non blocking linked lists). However on a 64 bit system those 2 bit are in use. After doing some googling I have found that AMD64 and IA64 use 48 bits. AMD plans to extend that 52 bits. So my question is, Am I safe to use bit 1 of a 64 bit address, if so will it be portable?
Waldermort
What exactly do you want to ask ? Is it processor architecture ? Is it C, or C++, or C# ? Is it Win32 / Win64 ? Is it about pointers ? If you (in C/C++/C#) have a BYTE array, then ALL lower bits of an address WILL be used; ohterwise you wouldn't be able to do a bulk read or write from a binary file. Of course, if you do so, you will earn a lot of additional CPU cycles due to misalignment of addresses to WORD / DWORD boundaries, but as cores are so fast now, it doesn't really matters