Skip to content

pool: chunk_at never reports neighbours for VS-backend chunks #85

Description

@glslang

From claude-review on #80. Regression introduced by #80.

neighbourhood_at's touching check compares left.end() with right.header_address. For VS spans header_address is the physical _POOL_HEADER location (chunk_start + vs_header_size), while end() is usable_address + size, collapsing to the raw chunk end. For two physically adjacent VS chunks these differ by exactly vs_header_size (0x10 on x64), so touching is always false and previous/next are always None for any VS allocation.

That is precisely the question chunk_at exists to answer, so the contiguity fix disabled the feature for one whole backend.

Why the tests missed it: they build spans with PoolSpan::allocation, which sets usable_address == header_address (LFH/Segment geometry) and never reproduces the VS offset. Any fix needs a VS-shaped fixture.

Options: compare raw chunk extents rather than mixing end() with header_address; or have adjacency account for vs_header_size.

Activity

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions