Skip to content

Unconditionally reserve the top header byte in runtime 4#2397

Merged
ncik-roberts merged 1 commit intooxcaml:reserve-header-bits-in-runtime-5from
ncik-roberts:reserve-header-bits-in-runtime-4
Apr 3, 2024
Merged

Unconditionally reserve the top header byte in runtime 4#2397
ncik-roberts merged 1 commit intooxcaml:reserve-header-bits-in-runtime-5from
ncik-roberts:reserve-header-bits-in-runtime-4

Conversation

@ncik-roberts
Copy link
Copy Markdown
Contributor

@ncik-roberts ncik-roberts commented Mar 25, 2024

Builds on #2389 to also unconditionally reserve the top header byte in runtime 4. This is a prerequisite for the rollout of mixed blocks.

A priori, you'd expect this change to be a no-op for existing code on 64 bit platforms. The top header byte, if not reserved, is interpreted as part of the size of the block. And you'd need to create a comically big value to require stealing bits from the top byte. Napkin math to support this claim: with the top header byte reserved, there are 46 remaining bits used to encode the size. To require more than 46 size bits, you'd need to create a value that's 2^46 words = 512 TiB large.

Internal testing supports this claim.

@ncik-roberts ncik-roberts changed the base branch from main to reserve-header-bits-in-runtime-5 March 25, 2024 21:56
@ncik-roberts ncik-roberts force-pushed the reserve-header-bits-in-runtime-4 branch from 24d6c9d to fbf4322 Compare March 26, 2024 14:50
@ncik-roberts ncik-roberts marked this pull request as ready for review April 2, 2024 17:35
@mshinwell mshinwell self-requested a review April 3, 2024 08:44
@ncik-roberts ncik-roberts merged commit fbf4322 into oxcaml:reserve-header-bits-in-runtime-5 Apr 3, 2024
@ncik-roberts ncik-roberts deleted the reserve-header-bits-in-runtime-4 branch April 3, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants