Skip to content

Avoid over-allocation for naturally aligned requests - #1408

Open
Connor Tsui (connortsui20) wants to merge 1 commit into
microsoft:main3from
connortsui20:ct/natural-alignment
Open

Connor Tsui (connortsui20) wants to merge 1 commit into
microsoft:main3from
connortsui20:ct/natural-alignment

Conversation

@connortsui20

@connortsui20 Connor Tsui (connortsui20) commented Sep 17, 2026

Copy link
Copy Markdown

This PR avoids over-allocation for requests smaller than their alignment by using a naturally aligned size class up to 4 KiB.

The size adjustment applies only to unpadded, zero-offset requests, preserving byte-precise overflow checks.

It also accepts alignments below 4 KiB for block sizes that are multiples of 4 KiB.

Backing block sizes in bytes:

Request (size, alignment) Before After
(64,256) 320 256
(1,4096) 5120 4096
(8192,32) 10240 8192
(65536,256) 81920 65536
(65536,4096) 65536 65536

Related: vortex-data/vortex#9812

@connortsui20

Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant