Relational NT
A relational database kernel shaped around NT-style object management.
Loading...
Searching...
No Matches
nt::ObjectManager::registry_head Struct Reference

Shared metadata stored at the head of a registry entry. More...

#include <ObjectManager.h>

Public Attributes

uint32_t reference_count = 0
 Structural dependency count.
uint32_t handle_count = 0
 Number of open handles.
std::unique_ptr< object_type > type
 Object type metadata.
std::vector< std::string > path
 Logical object path inside the namespace.

Detailed Description

Shared metadata stored at the head of a registry entry.

Two independent reference counters govern object lifetime. An object is eligible for garbage collection only when both reach zero:

All snapshot versions are immutable. An insertion or deletion produces a new snapshot rather than mutating an existing one. A snapshot's reference_count is non-zero while any cursor is pinned to it and drops to zero only when all such cursors are released.

Todo
Implement reference_count tracking. Add LifecycleManager::Pin / Unpin. Update LifecycleManager::Unmonitor to gate GC on both counters reaching zero. See docs/reactos-ob-comparison.md §1.
Todo
Define and attach a security_descriptor. When added, store it as a pointer into a shared, content-addressed SD cache rather than inline. Permissions are strictly capability-based and must never be inherited from a parent namespace entry. See docs/reactos-ob-comparison.md §5.

Member Data Documentation

◆ handle_count

uint32_t nt::ObjectManager::registry_head::handle_count = 0

Number of open handles.

Maintained by LifecycleManager::Monitor/Unmonitor.

◆ reference_count

uint32_t nt::ObjectManager::registry_head::reference_count = 0

Structural dependency count.

Non-zero while another registry object references this one (e.g. an ephemeral relation depending on a base relation, or a cursor pinned to a snapshot version).

Todo
Implement via LifecycleManager::Pin / Unpin.

◆ type

std::unique_ptr<object_type> nt::ObjectManager::registry_head::type

Object type metadata.

Owned by this head.


The documentation for this struct was generated from the following file: