Skip to content

Commit 414860b

Browse files
committed
[GR-57386] Increase Wasm memory limits.
PullRequest: js/3248
2 parents 09530c1 + 8709b54 commit 414860b

File tree

4 files changed

+10
-5
lines changed

4 files changed

+10
-5
lines changed

common.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"Jsonnet files should not include this file directly but use ci/common.jsonnet instead."
55
],
66

7-
"mx_version": "7.36.5",
7+
"mx_version": "7.38.0",
88

99
"COMMENT.jdks": "When adding or removing JDKs keep in sync with JDKs in ci/common.jsonnet",
1010
"jdks": {

graal-js/mx.graal-js/suite.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
{
2525
"name" : "regex",
2626
"subdir" : True,
27-
"version" : "7cc02b160cb19c7e7bda543a80e993bc190264b5",
27+
"version" : "f6e524983ab6bdc1ccce9693cf9b01eadf8c737f",
2828
"urls" : [
2929
{"url" : "https://github.com/oracle/graal.git", "kind" : "git"},
3030
]

graal-js/src/com.oracle.truffle.js/src/com/oracle/truffle/js/runtime/builtins/wasm/JSWebAssemblyMemory.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2020, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2020, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -62,7 +62,7 @@
6262
import com.oracle.truffle.js.runtime.objects.JSObjectUtil;
6363

6464
public class JSWebAssemblyMemory extends JSNonProxy implements JSConstructorFactory.Default, PrototypeSupplier {
65-
public static final int MAX_MEMORY_SIZE = 32767;
65+
public static final int MAX_MEMORY_SIZE = 65536;
6666
public static final TruffleString CLASS_NAME = Strings.constant("Memory");
6767
public static final TruffleString PROTOTYPE_NAME = Strings.constant("Memory.prototype");
6868

graal-nodejs/mx.graal-nodejs/com.oracle.truffle.trufflenode/src/com/oracle/truffle/trufflenode/Options.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright (c) 2018, 2024, Oracle and/or its affiliates. All rights reserved.
2+
* Copyright (c) 2018, 2025, Oracle and/or its affiliates. All rights reserved.
33
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
*
55
* The Universal Permissive License (UPL), Version 1.0
@@ -339,7 +339,12 @@ protected List<String> preprocessArguments(List<String> arguments, Map<String, S
339339
polyglotOptions.put("wasm.Threads", "true");
340340
if (optUnsafeWasmMemory == null) {
341341
optUnsafeWasmMemory = Boolean.TRUE;
342+
}
343+
if (optUnsafeWasmMemory) {
342344
polyglotOptions.put("wasm.UseUnsafeMemory", "true");
345+
// If using unsafe memory, also set it up so that UnsafeWasmMemory and
346+
// its direct ByteBuffer access are always available.
347+
polyglotOptions.put("wasm.DirectByteBufferMemoryAccess", "true");
343348
}
344349
}
345350
}

0 commit comments

Comments
 (0)