Skip to content

Conversation

eqrion
Copy link
Contributor

@eqrion eqrion commented Aug 19, 2025

Fixes #1895

PTAL @tlively or redirect

eqrion added 3 commits August 19, 2025 12:53
memory32 is the full 4GiB range. memory64 is at 2^37-1
so that when the page size is converted to bytes it is
less than the JS MAX_SAFE_INTEGER value.

Leave the runtime limits for memory sizes as-is.
We must allow maxsize greater than 4GiB for memory64. The
impl limit for memory64 will ensure the maxsize is within
MAX_SAFE_INTEGER.
@tlively
Copy link
Member

tlively commented Aug 19, 2025

cc @thibaudmichaud

Copy link
Collaborator

@Ms2ger Ms2ger left a comment

Choose a reason for hiding this comment

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

Thanks

1. [=Throw=] a {{TypeError}} exception.
1. Let |buffer| be **this**.\[[BufferObject]].
1. If [=IsFixedLengthArrayBuffer=](|buffer|) is false, return |buffer|.
1. Assert |memtype| has a max.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
1. Assert |memtype| has a max.
1. Assert: |memtype| has a max.

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.

3 participants