< prev index next >

test/native/gc/shared/test_collectorPolicy.cpp

Print this page

        

*** 159,169 **** class SetMaxNewSizeCmd : public BinaryExecutor { public: SetMaxNewSizeCmd(size_t param1, size_t param2) : BinaryExecutor(param1, param2) { } void execute() { size_t heap_alignment = CollectorPolicy::compute_heap_alignment(); ! size_t new_size_value = align_size_up(MaxHeapSize, heap_alignment) - param1 + param2; FLAG_SET_CMDLINE(size_t, MaxNewSize, new_size_value); } }; --- 159,169 ---- class SetMaxNewSizeCmd : public BinaryExecutor { public: SetMaxNewSizeCmd(size_t param1, size_t param2) : BinaryExecutor(param1, param2) { } void execute() { size_t heap_alignment = CollectorPolicy::compute_heap_alignment(); ! size_t new_size_value = align_up(MaxHeapSize, heap_alignment) - param1 + param2; FLAG_SET_CMDLINE(size_t, MaxNewSize, new_size_value); } };
*** 183,193 **** size_t heap_alignment = CollectorPolicy::compute_heap_alignment(); MarkSweepPolicy msp; msp.initialize_all(); ! size_t expected_old_initial = align_size_up(InitialHeapSize, heap_alignment) - MaxNewSize; ASSERT_EQ(expected_old_initial, msp.initial_old_size()); } }; --- 183,193 ---- size_t heap_alignment = CollectorPolicy::compute_heap_alignment(); MarkSweepPolicy msp; msp.initialize_all(); ! size_t expected_old_initial = align_up(InitialHeapSize, heap_alignment) - MaxNewSize; ASSERT_EQ(expected_old_initial, msp.initial_old_size()); } };
*** 195,211 **** class CheckOldInitialMaxNewSize : public BinaryExecutor { public: CheckOldInitialMaxNewSize(size_t param1, size_t param2) : BinaryExecutor(param1, param2) { } void execute() { size_t heap_alignment = CollectorPolicy::compute_heap_alignment(); ! size_t new_size_value = align_size_up(MaxHeapSize, heap_alignment) - param1 + param2; MarkSweepPolicy msp; msp.initialize_all(); ! size_t expected_old_initial = align_size_up(MaxHeapSize, heap_alignment) - new_size_value; ASSERT_EQ(expected_old_initial, msp.initial_old_size()); } }; --- 195,211 ---- class CheckOldInitialMaxNewSize : public BinaryExecutor { public: CheckOldInitialMaxNewSize(size_t param1, size_t param2) : BinaryExecutor(param1, param2) { } void execute() { size_t heap_alignment = CollectorPolicy::compute_heap_alignment(); ! size_t new_size_value = align_up(MaxHeapSize, heap_alignment) - param1 + param2; MarkSweepPolicy msp; msp.initialize_all(); ! size_t expected_old_initial = align_up(MaxHeapSize, heap_alignment) - new_size_value; ASSERT_EQ(expected_old_initial, msp.initial_old_size()); } };
< prev index next >