52 FLAG_SET_DEFAULT(UseGCOverheadLimit, false); |
52 FLAG_SET_DEFAULT(UseGCOverheadLimit, false); |
53 } |
53 } |
54 |
54 |
55 if (MinHeapFreeRatio == 100) { |
55 if (MinHeapFreeRatio == 100) { |
56 // Keeping the heap 100% free is hard ;-) so limit it to 99%. |
56 // Keeping the heap 100% free is hard ;-) so limit it to 99%. |
57 FLAG_SET_ERGO(uintx, MinHeapFreeRatio, 99); |
57 FLAG_SET_ERGO(MinHeapFreeRatio, 99); |
58 } |
58 } |
59 |
59 |
60 if (!ClassUnloading) { |
60 if (!ClassUnloading) { |
61 // If class unloading is disabled, also disable concurrent class unloading. |
61 // If class unloading is disabled, also disable concurrent class unloading. |
62 FLAG_SET_CMDLINE(bool, ClassUnloadingWithConcurrentMark, false); |
62 FLAG_SET_CMDLINE(ClassUnloadingWithConcurrentMark, false); |
63 } |
63 } |
64 |
64 |
65 if (!FLAG_IS_DEFAULT(AllocateOldGenAt)) { |
65 if (!FLAG_IS_DEFAULT(AllocateOldGenAt)) { |
66 // CompressedOops not supported when AllocateOldGenAt is set. |
66 // CompressedOops not supported when AllocateOldGenAt is set. |
67 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); |
67 LP64_ONLY(FLAG_SET_DEFAULT(UseCompressedOops, false)); |
170 size_t aligned_initial_heap_size = align_up(InitialHeapSize, HeapAlignment); |
170 size_t aligned_initial_heap_size = align_up(InitialHeapSize, HeapAlignment); |
171 size_t aligned_max_heap_size = align_up(MaxHeapSize, HeapAlignment); |
171 size_t aligned_max_heap_size = align_up(MaxHeapSize, HeapAlignment); |
172 |
172 |
173 // Write back to flags if the values changed |
173 // Write back to flags if the values changed |
174 if (aligned_initial_heap_size != InitialHeapSize) { |
174 if (aligned_initial_heap_size != InitialHeapSize) { |
175 FLAG_SET_ERGO(size_t, InitialHeapSize, aligned_initial_heap_size); |
175 FLAG_SET_ERGO(InitialHeapSize, aligned_initial_heap_size); |
176 } |
176 } |
177 if (aligned_max_heap_size != MaxHeapSize) { |
177 if (aligned_max_heap_size != MaxHeapSize) { |
178 FLAG_SET_ERGO(size_t, MaxHeapSize, aligned_max_heap_size); |
178 FLAG_SET_ERGO(MaxHeapSize, aligned_max_heap_size); |
179 } |
179 } |
180 |
180 |
181 if (FLAG_IS_CMDLINE(InitialHeapSize) && MinHeapSize != 0 && |
181 if (FLAG_IS_CMDLINE(InitialHeapSize) && MinHeapSize != 0 && |
182 InitialHeapSize < MinHeapSize) { |
182 InitialHeapSize < MinHeapSize) { |
183 vm_exit_during_initialization("Incompatible minimum and initial heap sizes specified"); |
183 vm_exit_during_initialization("Incompatible minimum and initial heap sizes specified"); |
184 } |
184 } |
185 if (!FLAG_IS_DEFAULT(InitialHeapSize) && InitialHeapSize > MaxHeapSize) { |
185 if (!FLAG_IS_DEFAULT(InitialHeapSize) && InitialHeapSize > MaxHeapSize) { |
186 FLAG_SET_ERGO(size_t, MaxHeapSize, InitialHeapSize); |
186 FLAG_SET_ERGO(MaxHeapSize, InitialHeapSize); |
187 } else if (!FLAG_IS_DEFAULT(MaxHeapSize) && InitialHeapSize > MaxHeapSize) { |
187 } else if (!FLAG_IS_DEFAULT(MaxHeapSize) && InitialHeapSize > MaxHeapSize) { |
188 FLAG_SET_ERGO(size_t, InitialHeapSize, MaxHeapSize); |
188 FLAG_SET_ERGO(InitialHeapSize, MaxHeapSize); |
189 if (InitialHeapSize < MinHeapSize) { |
189 if (InitialHeapSize < MinHeapSize) { |
190 MinHeapSize = InitialHeapSize; |
190 MinHeapSize = InitialHeapSize; |
191 } |
191 } |
192 } |
192 } |
193 |
193 |
194 FLAG_SET_ERGO(size_t, MinHeapDeltaBytes, align_up(MinHeapDeltaBytes, SpaceAlignment)); |
194 FLAG_SET_ERGO(MinHeapDeltaBytes, align_up(MinHeapDeltaBytes, SpaceAlignment)); |
195 |
195 |
196 DEBUG_ONLY(assert_flags();) |
196 DEBUG_ONLY(assert_flags();) |
197 } |
197 } |