PgMemoryContextOptions
Namespace: Ankus
Assembly: Ankus.Runtime.dll
Configures the native block sizes of a PostgreSQL AllocSet memory context.
public sealed class PgMemoryContextOptionsSizes are validated when creating a context. Nonzero sizes must satisfy the target PostgreSQL server’s alignment requirements; the native bridge also validates version-specific size limits. Blocks need not be powers of two, and the minimum context size may exceed the initial block size.
Inheritance: object
Constructors
Section titled “Constructors”PgMemoryContextOptions(nuint, nuint, nuint)
Section titled “PgMemoryContextOptions(nuint, nuint, nuint)”Configures the native block sizes of a PostgreSQL AllocSet memory context.
public PgMemoryContextOptions(nuint minimumContextSize = 0, nuint initialBlockSize = 8192, nuint maximumBlockSize = 8388608)Parameters:
minimumContextSize — nuint
The retained first-block size, or zero to use the initial block size.
initialBlockSize — nuint
The first ordinary allocation block size.
maximumBlockSize — nuint
The largest ordinary allocation block size.
Sizes are validated when creating a context. Nonzero sizes must satisfy the target PostgreSQL server’s alignment requirements; the native bridge also validates version-specific size limits. Blocks need not be powers of two, and the minimum context size may exceed the initial block size.
Properties
Section titled “Properties”Default
Section titled “Default”Gets PostgreSQL’s default AllocSet sizing preset.
public static PgMemoryContextOptions Default { get; }Value: PgMemoryContextOptions
InitialBlockSize
Section titled “InitialBlockSize”Gets the first ordinary allocation block size.
public nuint InitialBlockSize { get; }Value: nuint
MaximumBlockSize
Section titled “MaximumBlockSize”Gets the largest ordinary allocation block size.
public nuint MaximumBlockSize { get; }Value: nuint
MinimumContextSize
Section titled “MinimumContextSize”Gets the retained first-block size, or zero to use the initial block size.
public nuint MinimumContextSize { get; }Value: nuint
Gets the preset for contexts expected to remain small.
public static PgMemoryContextOptions Small { get; }Value: PgMemoryContextOptions
StartSmall
Section titled “StartSmall”Gets the preset for contexts that begin small and can grow to the default maximum.
public static PgMemoryContextOptions StartSmall { get; }Value: PgMemoryContextOptions