Skip to content
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

Allow demi_sgaalloc calls larger than 64KB #1133

Open
kyleholohan opened this issue Jan 18, 2024 · 0 comments
Open

Allow demi_sgaalloc calls larger than 64KB #1133

kyleholohan opened this issue Jan 18, 2024 · 0 comments
Labels
enhancement Enhancement Request on an Existing Feature

Comments

@kyleholohan
Copy link
Contributor

kyleholohan commented Jan 18, 2024

Context

The demi_sgaalloc API uses the LibOS's sgaalloc provider to allocate memory. Most (all?) LibOSes currently use MemoryRuntime to handle these sgaalloc calls. This implementation will fail allocations where the size parameter is greater than u16::MAX, as the code is not currently situated to allocate more than one DemiBuffer (the DemiBuffer length field is 16 bytes).

This limitation potentially requires clients to juggle multiple independent buffers, which could unnecessarily complicate client-side logic.

See also #88 (outdated)

Proposed Solution

Update MemoryRuntime's sgaalloc implementation to chain buffers to reach the desired allocation iota. Useful support will subsequently require changes to each LibOS to accept chained DemiBuffers.

Alternative Solutions

Allocation sizes could be limited to 16 bits as a formal contract, but this seems very artificially limiting versus other software.

@kyleholohan kyleholohan added the enhancement Enhancement Request on an Existing Feature label Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement Request on an Existing Feature
Projects
None yet
Development

No branches or pull requests

1 participant