Skip to content

Commit

Permalink
docs: document single char unit for heap size hint
Browse files Browse the repository at this point in the history
  • Loading branch information
MilesCranmer committed Oct 7, 2024
1 parent 021f7b3 commit a4818dd
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
14 changes: 7 additions & 7 deletions doc/src/manual/environment-variables.md
Original file line number Diff line number Diff line change
Expand Up @@ -396,18 +396,18 @@ affinitized. Otherwise, Julia lets the operating system handle thread policy.

### [`JULIA_HEAP_SIZE_HINT`](@id JULIA_HEAP_SIZE_HINT)

Environment variable equivalent to the `--heap-size-hint` command line option.
Environment variable equivalent to the `--heap-size-hint=<size>[<unit>]` command line option.

Forces garbage collection if memory usage is higher than the given value. The value may be specified as a number of bytes, optionally in units of:

- b (bytes)
- k (kibibytes)
- m (mebibytes)
- g (gibibytes)
- t (tebibytes)
- B (bytes)
- K (kibibytes)
- M (mebibytes)
- G (gibibytes)
- T (tebibytes)
- % (percentage of physical memory)

which are not case sensitive. For example, `JULIA_HEAP_SIZE_HINT=1G` would provide a 1 GB heap size hint to the garbage collector.
For example, `JULIA_HEAP_SIZE_HINT=1G` would provide a 1 GB heap size hint to the garbage collector.

## REPL formatting

Expand Down
5 changes: 3 additions & 2 deletions src/jloptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -281,8 +281,9 @@ static const char opts[] =
" information, see --bug-report=help.\n\n"
" --heap-size-hint=<size>[<unit>] Forces garbage collection if memory usage is higher\n"
" than the given value. The value may be specified as a\n"
" number of bytes, optionally in units of: B, KB, MB,\n"
" GB, TB, or as a percentage of physical memory (%)\n\n"
" number of bytes, optionally in units of: B, K (kilobytes),\n"
" M (megabytes), G (gigabytes), T (terabytes), or % (percentage\n"
" of physical memory).\n\n"
;

static const char opts_hidden[] =
Expand Down

0 comments on commit a4818dd

Please sign in to comment.