Re:Show HN: Stensal SDK: Retrofitting C/C++ code with quasi-...
by cryptonector on Sunday January 13, 2019 @11:21AM
(#18897238)
That helps.
In my mind I was picturing a double-wide pointer that (assuming 48-bit address spaces) carries 20 bits of type information, a pointer to an allocation descriptor, a pointer to / into the object, and 16-bit CRC of the allocation descriptor. The allocation descriptor itself would have a base address and size, a generation number, and maybe some bits for something else (what? perhaps another CRC?).
However, this would change the ABI...
And yes, I thought you were encoding the C type of the object pointed to in the pointer, which is why I was thinking wide pointers.
In my mind I was picturing a double-wide pointer that (assuming 48-bit address spaces) carries 20 bits of type information, a pointer to an allocation descriptor, a pointer to / into the object, and 16-bit CRC of the allocation descriptor. The allocation descriptor itself would have a base address and size, a generation number, and maybe some bits for something else (what? perhaps another CRC?).
However, this would change the ABI...
And yes, I thought you were encoding the C type of the object pointed to in the pointer, which is why I was thinking wide pointers.
Thanks for the clarification!