Skip to content

Buffer pool memory-pressure check allocates on return #205

Open

Description

@Kuinox

Allocation tests are flaky on CI: NestedColumnEnumerationDoesNotAllocateAfterWarmup sometimes sees 288 bytes after warmup.

Once DefaultParquetBufferPool retains 64 MB, its memory-pressure check calls GC.GetGCMemoryInfo() on the thread returning a buffer, at most once per second. That call allocates 288 bytes. The tests share DefaultParquetBufferPool.Shared, which can retain enough memory to trigger the check.

We should run the check from a gen-2 GC callback like ArrayPool.Shared does, instead of on the returning thread, while keeping trimming under memory pressure. We should also add a test using the internal constructor’s pressure predicate to check that returning a buffer does not allocate when the check is due.

🤖 Generated with pi (gpt-6.1-terra).

Activity

  1. changed the title [-]DefaultParquetBufferPool allocates 288 bytes on buffer return when checking memory pressure[/-] [+]Buffer pool memory-pressure check allocates on return[/+] on Nov 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions