Skip to content

Commit a3898f4

Browse files
committed
8357086: Addressed reviewer's comments
1 parent fef5de8 commit a3898f4

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/hotspot/share/runtime/arguments.cpp

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,6 @@ static const size_t DefaultHeapBaseMinAddress = HeapBaseMinAddress;
15041504

15051505
void Arguments::set_heap_size() {
15061506
julong phys_mem;
1507-
size_t physical_mem_val = 0;
15081507

15091508
// If the user specified one of these options, they
15101509
// want specific memory sizing so do not limit memory
@@ -1518,15 +1517,13 @@ void Arguments::set_heap_size() {
15181517
!FLAG_IS_DEFAULT(MaxRAM));
15191518
if (override_coop_limit) {
15201519
if (FLAG_IS_DEFAULT(MaxRAM)) {
1521-
physical_mem_val = os::physical_memory();
1522-
phys_mem = static_cast<julong>(physical_mem_val);
1520+
phys_mem = static_cast<julong>(os::physical_memory());
15231521
FLAG_SET_ERGO(MaxRAM, (uint64_t)phys_mem);
15241522
} else {
15251523
phys_mem = (julong)MaxRAM;
15261524
}
15271525
} else {
1528-
physical_mem_val = os::physical_memory();
1529-
phys_mem = FLAG_IS_DEFAULT(MaxRAM) ? MIN2(static_cast<julong>(physical_mem_val), (julong)MaxRAM)
1526+
phys_mem = FLAG_IS_DEFAULT(MaxRAM) ? MIN2(static_cast<julong>(os::physical_memory()), (julong)MaxRAM)
15301527
: (julong)MaxRAM;
15311528
}
15321529

0 commit comments

Comments
 (0)