Table of Contents

Struct StorageSegmentDescriptor

Namespace
Typhon.Engine
Assembly
Typhon.Engine.dll

Read-only description of one logical segment's on-disk footprint — its kind, the file pages it owns, and (for chunk-based segments) the chunk-layout constants the Database File Map's L3/L4 decoders need. Produced by EnumerateStorageSegments() for the Database File Map (Module 15).

public readonly struct StorageSegmentDescriptor
Inherited Members

Constructors

StorageSegmentDescriptor(int, StorageSegmentKind, ReadOnlyMemory<int>, int, int, int, int, int, int, int, int)

Creates a descriptor for a segment. Chunk-layout and chunk-count fields are 0 for non-chunk-based segments.

public StorageSegmentDescriptor(int rootPageIndex, StorageSegmentKind kind, ReadOnlyMemory<int> pages, int stride = 0, int chunkCountRootPage = 0, int chunkCountPerPage = 0, int rootDataOffset = 0, int otherDataOffset = 0, int allocatedChunkCount = 0, int freeChunkCount = 0, int chunkCapacity = 0)

Parameters

rootPageIndex int
kind StorageSegmentKind
pages ReadOnlyMemory<int>
stride int
chunkCountRootPage int
chunkCountPerPage int
rootDataOffset int
otherDataOffset int
allocatedChunkCount int
freeChunkCount int
chunkCapacity int

Properties

AllocatedChunkCount

Live count of currently-allocated chunks in a chunk-based segment; 0 when the segment is not chunk-based.

public int AllocatedChunkCount { get; }

Property Value

int

ChunkCapacity

Total chunk capacity currently provisioned across the segment's pages; 0 when the segment is not chunk-based.

public int ChunkCapacity { get; }

Property Value

int

ChunkCountPerPage

Chunk capacity of each non-root page.

public int ChunkCountPerPage { get; }

Property Value

int

ChunkCountRootPage

Chunk capacity of the segment's root page (the root page also holds the directory section).

public int ChunkCountRootPage { get; }

Property Value

int

FreeChunkCount

Live count of free chunks in a chunk-based segment (ChunkCapacityAllocatedChunkCount); 0 when not chunk-based.

public int FreeChunkCount { get; }

Property Value

int

IsChunkBased

Whether this segment stores fixed-size chunks (component / revision / index / VSBS / string-table).

public bool IsChunkBased { get; }

Property Value

bool

Kind

The segment's runtime role.

public StorageSegmentKind Kind { get; }

Property Value

StorageSegmentKind

OtherDataOffset

Byte offset within a non-root page where chunk 0 begins.

public int OtherDataOffset { get; }

Property Value

int

Pages

The file-page indices this segment owns, in directory order. Not necessarily contiguous on disk.

public ReadOnlyMemory<int> Pages { get; }

Property Value

ReadOnlyMemory<int>

RootDataOffset

Byte offset within the root page where chunk 0 begins.

public int RootDataOffset { get; }

Property Value

int

RootPageIndex

The segment's root file-page index — stable and unique per segment.

public int RootPageIndex { get; }

Property Value

int

Stride

Chunk stride in bytes for a chunk-based segment; 0 when the segment is not chunk-based.

public int Stride { get; }

Property Value

int