| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #include "vm/scavenger.h" | 5 #include "vm/scavenger.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <map> | 8 #include <map> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "vm/weak_table.h" | 24 #include "vm/weak_table.h" |
| 25 | 25 |
| 26 namespace dart { | 26 namespace dart { |
| 27 | 27 |
| 28 DEFINE_FLAG(int, early_tenuring_threshold, 66, | 28 DEFINE_FLAG(int, early_tenuring_threshold, 66, |
| 29 "When more than this percentage of promotion candidates survive, " | 29 "When more than this percentage of promotion candidates survive, " |
| 30 "promote all survivors of next scavenge."); | 30 "promote all survivors of next scavenge."); |
| 31 DEFINE_FLAG(int, new_gen_garbage_threshold, 90, | 31 DEFINE_FLAG(int, new_gen_garbage_threshold, 90, |
| 32 "Grow new gen when less than this percentage is garbage."); | 32 "Grow new gen when less than this percentage is garbage."); |
| 33 DEFINE_FLAG(int, new_gen_growth_factor, 4, "Grow new gen by this factor."); | 33 DEFINE_FLAG(int, new_gen_growth_factor, 4, "Grow new gen by this factor."); |
| 34 DECLARE_FLAG(bool, concurrent_sweep); | |
| 35 | 34 |
| 36 // Scavenger uses RawObject::kMarkBit to distinguish forwaded and non-forwarded | 35 // Scavenger uses RawObject::kMarkBit to distinguish forwaded and non-forwarded |
| 37 // objects. The kMarkBit does not intersect with the target address because of | 36 // objects. The kMarkBit does not intersect with the target address because of |
| 38 // object alignment. | 37 // object alignment. |
| 39 enum { | 38 enum { |
| 40 kForwardingMask = 1 << RawObject::kMarkBit, | 39 kForwardingMask = 1 << RawObject::kMarkBit, |
| 41 kNotForwarded = 0, | 40 kNotForwarded = 0, |
| 42 kForwarded = kForwardingMask, | 41 kForwarded = kForwardingMask, |
| 43 }; | 42 }; |
| 44 | 43 |
| (...skipping 826 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 871 } | 870 } |
| 872 | 871 |
| 873 | 872 |
| 874 void Scavenger::FreeExternal(intptr_t size) { | 873 void Scavenger::FreeExternal(intptr_t size) { |
| 875 ASSERT(size >= 0); | 874 ASSERT(size >= 0); |
| 876 external_size_ -= size; | 875 external_size_ -= size; |
| 877 ASSERT(external_size_ >= 0); | 876 ASSERT(external_size_ >= 0); |
| 878 } | 877 } |
| 879 | 878 |
| 880 } // namespace dart | 879 } // namespace dart |
| OLD | NEW |