OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 1727 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1738 !p->IsFlagSet(Page::RESCAN_ON_EVACUATION) && | 1738 !p->IsFlagSet(Page::RESCAN_ON_EVACUATION) && |
1739 !p->WasSweptPrecisely(); | 1739 !p->WasSweptPrecisely(); |
1740 } | 1740 } |
1741 | 1741 |
1742 void SetPagesToSweep(Page* first) { | 1742 void SetPagesToSweep(Page* first) { |
1743 ASSERT(unswept_free_bytes_ == 0); | 1743 ASSERT(unswept_free_bytes_ == 0); |
1744 if (first == &anchor_) first = NULL; | 1744 if (first == &anchor_) first = NULL; |
1745 first_unswept_page_ = first; | 1745 first_unswept_page_ = first; |
1746 } | 1746 } |
1747 | 1747 |
1748 void IncrementUnsweptFreeBytes(int by) { | 1748 void IncrementUnsweptFreeBytes(intptr_t by) { |
1749 unswept_free_bytes_ += by; | 1749 unswept_free_bytes_ += by; |
1750 } | 1750 } |
1751 | 1751 |
1752 void IncreaseUnsweptFreeBytes(Page* p) { | 1752 void IncreaseUnsweptFreeBytes(Page* p) { |
1753 ASSERT(ShouldBeSweptLazily(p)); | 1753 ASSERT(ShouldBeSweptLazily(p)); |
1754 unswept_free_bytes_ += (p->area_size() - p->LiveBytes()); | 1754 unswept_free_bytes_ += (p->area_size() - p->LiveBytes()); |
1755 } | 1755 } |
1756 | 1756 |
1757 void DecrementUnsweptFreeBytes(int by) { | 1757 void DecrementUnsweptFreeBytes(intptr_t by) { |
1758 unswept_free_bytes_ -= by; | 1758 unswept_free_bytes_ -= by; |
1759 } | 1759 } |
1760 | 1760 |
1761 void DecreaseUnsweptFreeBytes(Page* p) { | 1761 void DecreaseUnsweptFreeBytes(Page* p) { |
1762 ASSERT(ShouldBeSweptLazily(p)); | 1762 ASSERT(ShouldBeSweptLazily(p)); |
1763 unswept_free_bytes_ -= (p->area_size() - p->LiveBytes()); | 1763 unswept_free_bytes_ -= (p->area_size() - p->LiveBytes()); |
1764 } | 1764 } |
1765 | 1765 |
1766 void ResetUnsweptFreeBytes() { | 1766 void ResetUnsweptFreeBytes() { |
1767 unswept_free_bytes_ = 0; | 1767 unswept_free_bytes_ = 0; |
(...skipping 1059 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2827 } | 2827 } |
2828 // Must be small, since an iteration is used for lookup. | 2828 // Must be small, since an iteration is used for lookup. |
2829 static const int kMaxComments = 64; | 2829 static const int kMaxComments = 64; |
2830 }; | 2830 }; |
2831 #endif | 2831 #endif |
2832 | 2832 |
2833 | 2833 |
2834 } } // namespace v8::internal | 2834 } } // namespace v8::internal |
2835 | 2835 |
2836 #endif // V8_SPACES_H_ | 2836 #endif // V8_SPACES_H_ |
OLD | NEW |