Skip to content

feat: increase MAX_MEMORY_SIZE from ~1 GiB to ~16 GiB#1340

Merged
simongdavies merged 1 commit intohyperlight-dev:mainfrom
simongdavies:configurable-sandbox-memory
Mar 24, 2026
Merged

feat: increase MAX_MEMORY_SIZE from ~1 GiB to ~16 GiB#1340
simongdavies merged 1 commit intohyperlight-dev:mainfrom
simongdavies:configurable-sandbox-memory

Conversation

@simongdavies
Copy link
Contributor

The previous limit of 0x4000_0000 - BASE_ADDRESS (~1 GiB) was arbitrary and insufficient for some Nnanvix related cases. Bump to (16 GiB - BASE_ADDRESS) which is large enough for most use cases while still preventing accidental resource exhaustion.

The BASE_ADDRESS subtraction is preserved for consistency with the original definition.

Update test to validate the new ~16 GiB boundary.

The previous limit of 0x4000_0000 - BASE_ADDRESS (~1 GiB) was
arbitrary and insufficient for some nanvix related cases. Bump to
(16 GiB - BASE_ADDRESS) which is large enough for most use cases
while still preventing accidental resource exhaustion.

The BASE_ADDRESS subtraction is preserved for consistency with
the original definition.

Update test to validate the new ~16 GiB boundary.

Signed-off-by: Simon Davies <simongdavies@users.noreply.github.com>
@simongdavies simongdavies added the kind/enhancement For PRs adding features, improving functionality, docs, tests, etc. label Mar 24, 2026
Copy link
Contributor

@ludfjig ludfjig left a comment

Choose a reason for hiding this comment

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

LGTM! Could we add a unit test that exercises this too by creating a sandbox slightly smaller than 16GB and running it?

@simongdavies
Copy link
Contributor Author

LGTM! Could we add a unit test that exercises this too by creating a sandbox slightly smaller than 16GB and running it?

One reason I didn't do this is that I wasnt 100% sure how much memory would actually get allocated if I did this and if it would cause tests to fail on dev machines..

@ludfjig
Copy link
Contributor

ludfjig commented Mar 24, 2026

oh yeah maybe this would actually allocate until cow work is complete

@simongdavies simongdavies merged commit e2d622c into hyperlight-dev:main Mar 24, 2026
41 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement For PRs adding features, improving functionality, docs, tests, etc.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants