You can also mix both the offset and the magic marker using xor:
mem[ix] = ix ^ magic_value; [download]
In reply to Re^3: [OT] Stats problem by salva in thread [OT] Stats problem by BrowserUk