{
  "slug": "nv-heaps",
  "term": "NV-Heaps",
  "aliases": [
    "Non-volatile Memory Heaps"
  ],
  "definition": "NV-Heaps is a persistent-object system combining transactions, managed allocation and checked pointers within independently mapped nonvolatile heaps.",
  "note": "Scope: The ASPLOS 2011 design exposes persistent objects through a mapped heap and a root reference. Its safety layer distinguishes object lifetime from retaining bytes. [paper]\n\nReferences: Assignments may refer within one persistent heap or from volatile memory into it. Persistent-to-volatile and cross-heap persistent pointers are rejected using heap identities. Relative addressing supports relocation, not arbitrary cross-heap ownership. [paper] [slides]\n\nCollection: Strong references keep objects alive. Cycles require weak links that do not increase reference counts; proxies nullify weak links when their targets die. The implementation keeps mapped heaps open until program exit to avoid dangling volatile references. [paper]\n\nTransactions: Object-level undo logs restore interrupted updates. Accessors must be used without unsafe casts; shared volatile state is outside transaction isolation. [paper]\n\nExample: Removing the root of a two-object strong cycle leaves both reference counts positive. Making its back edge weak permits collection. The linked executable example separates this graph property from crash recovery. [model]",
  "status": "research",
  "advantages": [
    {
      "text": "Self-contained heaps can be relocated without rebuilding every internal address.",
      "citationIds": [
        "slides"
      ]
    }
  ],
  "limitations": [
    {
      "text": "Reference counting does not automatically reclaim strong cycles.",
      "citationIds": [
        "slides"
      ]
    },
    {
      "text": "The paper's recovery tests used SIGKILL, while memory-technology performance used emulation; neither establishes physical power-loss behavior.",
      "citationIds": [
        "paper"
      ]
    }
  ],
  "related": [
    "persistent-memory",
    "crash-consistency",
    "epoch-persistency",
    "stasis",
    "bpfs",
    "mnemosyne"
  ],
  "supersedes": [],
  "supersededBy": [],
  "firstSeen": null,
  "lastSeen": null,
  "updated": "2026-12-05",
  "citations": [
    {
      "id": "paper",
      "title": "Coburn et al. NV-Heaps: Making Persistent Objects Fast and Safe with Next-Generation, Non-Volatile Memories. ASPLOS 2011, sections 2-5.",
      "url": "https://cseweb.ucsd.edu/~swanson/papers/Asplos2011NVHeaps.pdf",
      "accessed": "2026-12-05"
    },
    {
      "id": "slides",
      "title": "Joel Coburn. NV-Heaps. SNIA Storage Developer Conference 2013, slides 18-22: relocation, reference counting and transactions.",
      "url": "https://www.sniadeveloper.org/sites/default/files/files2/files2/SDC2013/presentations/Revisions/JoelCoburn_NVHeaps_Revision.pdf",
      "accessed": "2026-12-05"
    },
    {
      "id": "model",
      "title": "Hesela: Persistent pointer boundaries and reference-count cycles. Executable synthetic example and tests.",
      "url": "https://hesela.dev/research/nv-heaps/README.md",
      "accessed": "2026-12-05"
    }
  ],
  "provenance": [
    "Full ASPLOS 2011 paper reviewed for sections 2.3, 3.4-3.7 and 4-5; author presentation cross-checks the pointer, collection and transaction layers.",
    "This is a historical research design, not a guarantee supplied by generic persistent memory or a current production runtime.",
    "The linked example is an original finite graph model. It does not execute NV-Heaps, emulate its allocator or reproduce crash tests and performance measurements."
  ]
}
