Skip to content

PgMemoryContextOptions

Namespace: Ankus

Assembly: Ankus.Runtime.dll

Configures the native block sizes of a PostgreSQL AllocSet memory context.

public sealed class PgMemoryContextOptions

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.

Inheritance: object

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.

Gets PostgreSQL’s default AllocSet sizing preset.

public static PgMemoryContextOptions Default { get; }

Value: PgMemoryContextOptions

Gets the first ordinary allocation block size.

public nuint InitialBlockSize { get; }

Value: nuint

Gets the largest ordinary allocation block size.

public nuint MaximumBlockSize { get; }

Value: nuint

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

Gets the preset for contexts that begin small and can grow to the default maximum.

public static PgMemoryContextOptions StartSmall { get; }

Value: PgMemoryContextOptions