Skip to content

common: define kMiniHeapSize and use it in MeshableArena's CheapHeap #108

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 6, 2024

Conversation

bpowers
Copy link
Member

@bpowers bpowers commented Apr 6, 2024

It was surprising and frustrating to find a random 64 in MeshableArena's:

  CheapHeap<64, kArenaSize / kPageSize> _mhAllocator{};

is tied to the size of MiniHeap. Make that explicit by defining a constant, and ensuring the constant stays in line with the size of MiniHeap through the use of a static_assert.

Updates #104

@bpowers bpowers merged commit 0a4294e into plasma-umass:master Apr 6, 2024
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