self-relative-pointer · research · also off-holder pointer, holder-relative pointer

Self-relative pointer

A self-relative pointer represents its target as a byte displacement from the address where the pointer value is stored.

Related Observatory article: Read on hesela.com

Relocation: The displacement remains valid when holder and target move together with unchanged separation; moving only one endpoint requires rebasing. The off-holder design applies this representation within an NVRegion. [1] [2]

Copying: Copying the encoded displacement to a new holder is different from assigning the same target. In an integer example, holder 0x1000 and target 0x1080 encode +0x80. Copying that value to holder 0x1100 decodes to 0x1180; preserving target 0x1080 requires -0x80. [3]

Memberwise copy: Copying a C++ struct containing a Ralloc pptr preserves the original pointee, not the corresponding member of the new struct. The native example also checks assignment and move construction; these are not deep copies or memory-image remapping. [3]

Nulls: A zero displacement can represent a reference to the holder itself. The offset_ptr implementation reserves displacement 1 for null instead, so its null convention is not interchangeable with other encodings. [1]

Boundary: Position independence does not establish object lifetime, compatible layout, atomic updates or durability. The integer model evaluates address arithmetic only; the separately labelled native probe exercises one pinned implementation. [3]

Relations

related
Region ID in Value (RIV), Ralloc, Persistent memory, Crash consistency

Citations

  1. Boost.Interprocess 1.85. Mapping Address Independent Pointer: offset_ptr. (accessed 2026-12-05)
  2. Chen et al. Efficient Support of Position Independence on Non-Volatile Memory. MICRO 2017, sections 4-6. DOI: 10.1145/3123939.3124543. (accessed 2026-12-05)
  3. Hesela. Relative-pointer relocation: integer model, native struct-copy checks and worked cases. (accessed 2026-12-05)
Sources & caveats
  • Off-holder is the name used in the 2017 paper; the record groups it with the equivalent holder-relative representation, not a separate invention claim.
  • Worked addresses are synthetic byte addresses, not C++ pointer arithmetic or a crash-recovery experiment.

JSON: /data/terms/self-relative-pointer.json

Published by Hesela team · Updated

Report a correction · Editorial standards · Reuse guidance

Cite this page
Hesela team. Self-relative pointer. Hesela. 2026-12-05. https://hesela.dev/terms/self-relative-pointer/