aboutsummaryrefslogtreecommitdiff
path: root/src/share/vm/memory/collectorPolicy.cpp
diff options
context:
space:
mode:
authorstefank <none@none>2013-10-07 15:51:08 +0200
committerstefank <none@none>2013-10-07 15:51:08 +0200
commitbab4ad92acecaf8a0a141329cbf740eb40c507b7 (patch)
tree3ec592fd4c63f7e3a8a9968641ed7cafef683d81 /src/share/vm/memory/collectorPolicy.cpp
parent00df81e3819122ba8f8d9601b2ed8f01d5806de3 (diff)
8024547: MaxMetaspaceSize should limit the committed memory used by the metaspaces
Reviewed-by: brutisso, jmasa, coleenp
Diffstat (limited to 'src/share/vm/memory/collectorPolicy.cpp')
-rw-r--r--src/share/vm/memory/collectorPolicy.cpp32
1 files changed, 0 insertions, 32 deletions
diff --git a/src/share/vm/memory/collectorPolicy.cpp b/src/share/vm/memory/collectorPolicy.cpp
index dccc5214f..a3c466327 100644
--- a/src/share/vm/memory/collectorPolicy.cpp
+++ b/src/share/vm/memory/collectorPolicy.cpp
@@ -47,11 +47,6 @@
// CollectorPolicy methods.
-// Align down. If the aligning result in 0, return 'alignment'.
-static size_t restricted_align_down(size_t size, size_t alignment) {
- return MAX2(alignment, align_size_down_(size, alignment));
-}
-
void CollectorPolicy::initialize_flags() {
assert(_max_alignment >= _min_alignment,
err_msg("max_alignment: " SIZE_FORMAT " less than min_alignment: " SIZE_FORMAT,
@@ -64,34 +59,7 @@ void CollectorPolicy::initialize_flags() {
vm_exit_during_initialization("Incompatible initial and maximum heap sizes specified");
}
- // Do not use FLAG_SET_ERGO to update MaxMetaspaceSize, since this will
- // override if MaxMetaspaceSize was set on the command line or not.
- // This information is needed later to conform to the specification of the
- // java.lang.management.MemoryUsage API.
- //
- // Ideally, we would be able to set the default value of MaxMetaspaceSize in
- // globals.hpp to the aligned value, but this is not possible, since the
- // alignment depends on other flags being parsed.
- MaxMetaspaceSize = restricted_align_down(MaxMetaspaceSize, _max_alignment);
-
- if (MetaspaceSize > MaxMetaspaceSize) {
- MetaspaceSize = MaxMetaspaceSize;
- }
-
- MetaspaceSize = restricted_align_down(MetaspaceSize, _min_alignment);
-
- assert(MetaspaceSize <= MaxMetaspaceSize, "Must be");
-
- MinMetaspaceExpansion = restricted_align_down(MinMetaspaceExpansion, _min_alignment);
- MaxMetaspaceExpansion = restricted_align_down(MaxMetaspaceExpansion, _min_alignment);
-
MinHeapDeltaBytes = align_size_up(MinHeapDeltaBytes, _min_alignment);
-
- assert(MetaspaceSize % _min_alignment == 0, "metapace alignment");
- assert(MaxMetaspaceSize % _max_alignment == 0, "maximum metaspace alignment");
- if (MetaspaceSize < 256*K) {
- vm_exit_during_initialization("Too small initial Metaspace size");
- }
}
void CollectorPolicy::initialize_size_info() {