Skip to content

Commit 49ca52b

Browse files
matneuntemmar
authored andcommitted
Update docs on CPU/memory limits
1 parent 6a06def commit 49ca52b

File tree

3 files changed

+7
-3
lines changed

3 files changed

+7
-3
lines changed

SECURITY.md

-1
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,3 @@ GraalVM Community Edition security updates will be released on a quarterly basis
1111
### Security-Related Information
1212

1313
Please refer to the [GraalVM Security Guide](https://www.graalvm.org/docs/security-guide/) for security related topics such as how to support trusted and less trusted code execution using the Truffle language framework, or compiler mitigations for transitive execution attacks. However please note that we do not currently support the execution of untrusted or adversarial code. Non-vulnerability related security issues may be discussed on GitHub Issues or the Security channel in the [GraalVM Slack Workspace](https://graalvm.slack.com/)
14-

ci.jsonnet

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ local javadoc = import "ci_includes/publish-javadoc.jsonnet";
3232
local vm = import 'vm/ci_includes/vm.jsonnet';
3333

3434
# Add a guard to `build` that prevents it from running in the gate
35-
# for a PR that only touches *.md files, the docs, are config files for GitHub.
35+
# for a PR that only touches *.md files, the docs, are config files for GitHub
3636
local add_excludes_guard(build) = build + {
3737
guard+: {
3838
excludes+: ["**.md", "docs/**", ".github/**"]

docs/reference-manual/embedding/sandbox-options.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ If the time limit is exceeded then the polyglot context is cancelled and the exe
5555
As soon as the time limit is triggered, no further application code can be executed with this context.
5656
It will continuously throw a `PolyglotException` for any method of the polyglot context that will be invoked.
5757

58+
The used CPU time of a context includes time spent in callbacks to host code.
59+
This is also the case when running with [Polyglot Isolates].
60+
5861
The used CPU time of a context typically does not include time spent waiting for synchronization or IO.
5962
The CPU time of all threads will be added and checked against the CPU time limit.
6063
This can mean that if two threads execute the same context then the time limit will be exceeded twice as fast.
@@ -161,9 +164,11 @@ Resetting resource limits does not affect thread limits.
161164

162165
The `sandbox.MaxHeapMemory` option allows you to specify the maximum heap memory the application is allowed to retain during its run.
163166
`sandbox.MaxHeapMemory` must be positive. This option is only supported on a HotSpot-based VM.
164-
Enabling this option in AOT mode will result in PolyglotException.
167+
Enabling this option in a native executable will result in a `PolyglotException`.
168+
The option is also not supported with [Polyglot Isolates], which have different means of controlling memory consumption.
165169
When exceeding of the limit is detected, the corresponding context is automatically cancelled and then closed.
166170

171+
Only objects residing in the guest application count towards the limit - memory allocated during callbacks to host code does not.
167172
The efficacy of this option (also) depends on the garbage collector used.
168173

169174
#### Example Usage

0 commit comments

Comments
 (0)