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.
From claude-review on #80. Regression introduced by #80.
neighbourhood_at'stouchingcheck comparesleft.end()withright.header_address. For VS spansheader_addressis the physical_POOL_HEADERlocation (chunk_start + vs_header_size), whileend()isusable_address + size, collapsing to the raw chunk end. For two physically adjacent VS chunks these differ by exactlyvs_header_size(0x10 on x64), sotouchingis always false andprevious/nextare alwaysNonefor any VS allocation.That is precisely the question
chunk_atexists 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 setsusable_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()withheader_address; or have adjacency account forvs_header_size.