Skip to content

Commit

Permalink
[GR-58699] Improve documentation for the sandbox.UseLowMemoryTrigger …
Browse files Browse the repository at this point in the history
…option.

PullRequest: graal/18971
  • Loading branch information
jchalou committed Oct 7, 2024
2 parents 5559305 + 1ed98a7 commit 6da8560
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/security/polyglot-sandbox.md
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,7 @@ The allocated bytes are checked by a separate high-priority thread that will be
There is one such thread for each memory-limited context (one with `sandbox.MaxHeapMemory` set).
The retained bytes computation is done by yet another high-priority thread that is started from the allocated bytes checking thread as needed.
The retained bytes computation thread also cancels the context if the heap memory limit is exceeded.
Additionally, when the low memory trigger is invoked, all contexts on engines with at least one memory-limited context are paused together with their allocation checkers.
Additionally, when the low memory trigger is invoked, all memory-limited contexts are paused together with their allocation checkers.
All individual retained size computations are canceled.
Retained bytes in the heap for each memory-limited context are computed by a single high-priority thread.

Expand Down Expand Up @@ -390,7 +390,7 @@ The described low memory trigger can be disabled by the `sandbox.UseLowMemoryTri
By default it is enabled ("true"). If disabled ("false"), retained size checking for the execution context can be triggered only by the allocated bytes checker.
All contexts using the `sandbox.MaxHeapMemory` option must use the same value for `sandbox.UseLowMemoryTrigger`.

The `sandbox.UseLowMemoryTrigger` option is not supported for the ISOLATED and UNTRUSTED sandbox policies. The option defaults to disabled (`false`) wherever it is not supported.
The `sandbox.UseLowMemoryTrigger` option is not supported for the ISOLATED and UNTRUSTED sandbox policies as the polyglot engine runs in a `native-image` isolate for those policies. It is also not supported on a `native-image` host regardless of the policy. The option defaults to disabled (`false`) wherever it is not supported.

### Limiting the Amount of Data Written to Standard Output and Error Streams

Expand Down

0 comments on commit 6da8560

Please sign in to comment.