Skip to content

Commit

Permalink
don't set -XX:MetaspaceSize= setting since it can prevent cleanup of …
Browse files Browse the repository at this point in the history
…allocated native memory
  • Loading branch information
lhotari committed Apr 21, 2015
1 parent 397865f commit d14f6d6
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion docs/jre-open_jdk_jre.md
Expand Up @@ -39,7 +39,7 @@ The following optional properties may be specified in the `memory_sizes` mapping
| Name | Description
| ---- | -----------
| `heap` | The maximum heap size to use. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line options `-Xmx` and `-Xms`.
| `metaspace` | The maximum Metaspace size to use. It is applicable to versions of OpenJDK from 1.8 onwards. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line options `-XX:MaxMetaspaceSize=` and `-XX:MetaspaceSize=`.
| `metaspace` | The maximum Metaspace size to use. It is applicable to versions of OpenJDK from 1.8 onwards. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line options `-XX:MaxMetaspaceSize=`.
| `native` | The amount of memory to reserve for native memory allocation. It should normally be omitted or specified as a range with no upper bound such as `100m..`. It does not correspond to a switch on the Java command line.
| `permgen` | The maximum PermGen size to use. It is applicable to versions of OpenJDK earlier than 1.8. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line options `-XX:MaxPermSize=` and `-XX:PermSize=`.
| `stack` | The stack size to use. It may be a single value such as `2m` or a range of acceptable values such as `2m..4m`. It is used to calculate the value of the Java command line option `-Xss`.
Expand Down
2 changes: 1 addition & 1 deletion docs/jre-oracle_jre.md
Expand Up @@ -48,7 +48,7 @@ The following optional properties may be specified in the `memory_sizes` mapping
| Name | Description
| ---- | -----------
| `heap` | The maximum heap size to use. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line options `-Xmx` and `-Xms`.
| `metaspace` | The maximum Metaspace size to use. It is applicable to versions of Oracle from 1.8 onwards. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line options `-XX:MaxMetaspaceSize=` and `-XX:MetaspaceSize=`.
| `metaspace` | The maximum Metaspace size to use. It is applicable to versions of Oracle from 1.8 onwards. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line option `-XX:MaxMetaspaceSize=`.
| `native` | The amount of memory to reserve for native memory allocation. It should normally be omitted or specified as a range with no upper bound such as `100m..`. It does not correspond to a switch on the Java command line.
| `permgen` | The maximum PermGen size to use. It is applicable to versions of Oracle earlier than 1.8. It may be a single value such as `64m` or a range of acceptable values such as `128m..256m`. It is used to calculate the value of the Java command line options `-XX:MaxPermSize=` and `-XX:PermSize=`.
| `stack` | The stack size to use. It may be a single value such as `2m` or a range of acceptable values such as `2m..4m`. It is used to calculate the value of the Java command line option `-Xss`.
Expand Down
Expand Up @@ -47,7 +47,7 @@ def create_memory_heuristic(sizes, heuristics, version)

JAVA_OPTS = {
'heap' => ->(v) { %W(-Xmx#{v} -Xms#{v}) },
'metaspace' => ->(v) { %W(-XX:MaxMetaspaceSize=#{v} -XX:MetaspaceSize=#{v}) },
'metaspace' => ->(v) { %W(-XX:MaxMetaspaceSize=#{v}) },
'permgen' => ->(v) { %W(-XX:MaxPermSize=#{v} -XX:PermSize=#{v}) },
'stack' => ->(v) { ["-Xss#{v}"] }
}.freeze
Expand Down
Expand Up @@ -42,7 +42,7 @@
let(:expected_java_memory_options) do
{
'heap' => ->(v) { %W(-Xmx#{v} -Xms#{v}) },
'metaspace' => ->(v) { %W(-XX:MaxMetaspaceSize=#{v} -XX:MetaspaceSize=#{v}) },
'metaspace' => ->(v) { %W(-XX:MaxMetaspaceSize=#{v}) },
'permgen' => ->(v) { %W(-XX:MaxPermSize=#{v} -XX:PermSize=#{v}) },
'stack' => ->(v) { %W(-Xss#{v}) }
}
Expand Down

0 comments on commit d14f6d6

Please sign in to comment.