mirror of
https://github.com/boostorg/interprocess.git
synced 2026-01-24 18:02:21 +00:00
If the pointed adress is 128 bytes lower than 'this', we have (a) 32bit uintptr_t, 32bit OffsetType: offset = 0x ffffff80 (b) 64bit uintptr_t, 64bit OffsetType: offset = 0xffffffffffffff80 (c) 32bit uintptr_t, 64bit OffsetType: offset = 0x00000000ffffff80 If we read (c) from an 64bit process, it gets interpreted as 4294967232 bytes forward rather than 128 bytes backward. This commit solves the problem by ajusting the offset representation of (c) to match (b). For the 32bit process itself (c) this makes no difference, as the most significant 4 bytes get truncated anyway when convertig to a pointer. Note: For the default OffsetType=uintptr_t this change is only syntactical.