Struct StorageSegmentDescriptor
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
rootPageIndexintkindStorageSegmentKindpagesReadOnlyMemory<int>strideintchunkCountRootPageintchunkCountPerPageintrootDataOffsetintotherDataOffsetintallocatedChunkCountintfreeChunkCountintchunkCapacityint
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
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
ChunkCountPerPage
Chunk capacity of each non-root page.
public int ChunkCountPerPage { get; }
Property Value
ChunkCountRootPage
Chunk capacity of the segment's root page (the root page also holds the directory section).
public int ChunkCountRootPage { get; }
Property Value
FreeChunkCount
Live count of free chunks in a chunk-based segment (ChunkCapacity − AllocatedChunkCount); 0 when not chunk-based.
public int FreeChunkCount { get; }
Property Value
IsChunkBased
Whether this segment stores fixed-size chunks (component / revision / index / VSBS / string-table).
public bool IsChunkBased { get; }
Property Value
Kind
The segment's runtime role.
public StorageSegmentKind Kind { get; }
Property Value
OtherDataOffset
Byte offset within a non-root page where chunk 0 begins.
public int OtherDataOffset { get; }
Property Value
Pages
The file-page indices this segment owns, in directory order. Not necessarily contiguous on disk.
public ReadOnlyMemory<int> Pages { get; }
Property Value
RootDataOffset
Byte offset within the root page where chunk 0 begins.
public int RootDataOffset { get; }
Property Value
RootPageIndex
The segment's root file-page index — stable and unique per segment.
public int RootPageIndex { get; }
Property Value
Stride
Chunk stride in bytes for a chunk-based segment; 0 when the segment is not chunk-based.
public int Stride { get; }