Skip to content

Allocator claims rework - #727

Open
nwf wants to merge 3 commits into
mainfrom
nwf/202607-claims_rework
Open

Allocator claims rework#727
nwf wants to merge 3 commits into
mainfrom
nwf/202607-claims_rework

Conversation

@nwf

@nwf nwf commented Jul 2, 2026

Copy link
Copy Markdown
Member

This changes the internal workings of Claim objects within the heap allocator, specifically so we no longer need to take a pointer to the claims chain head field within a MChunkHeader. With that change made, we should be able to vary the widths of owner and claims (encoded) pointer fields within MChunkHeader and Claims, and in particular make this width larger than 16 bits, which is one, and possibly the simplest, approach to getting us to supporting more than 512KiB heaps.

@nwf
nwf requested a review from davidchisnall July 2, 2026 22:02
}

__cheriot_minimum_stack(0x1c0) ssize_t
__cheriot_minimum_stack(0x1d0) ssize_t

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know why this got bigger?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My unverified suspicion is that it's the ChainPredecessor tagged union (a pointer and a flag) vs just the uint16_t we were carrying around before?

@nwf nwf mentioned this pull request Jul 5, 2026
nwf added 2 commits July 6, 2026 14:22
Rather than an absolue address, this takes an offset relative to the
heap start address.
@nwf
nwf force-pushed the nwf/202607-claims_rework branch from 48dc0b8 to 4116d2b Compare July 7, 2026 20:09
All this so we can avoid the need to take references to bitfield
members.
@nwf
nwf force-pushed the nwf/202607-claims_rework branch from 4116d2b to 8ecf0c1 Compare July 7, 2026 20:16
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.

2 participants