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 1679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1690 | 1690 |
1691 void Allocate(int bytes) { | 1691 void Allocate(int bytes) { |
1692 accounting_stats_.AllocateBytes(bytes); | 1692 accounting_stats_.AllocateBytes(bytes); |
1693 } | 1693 } |
1694 | 1694 |
1695 void IncreaseCapacity(int size) { | 1695 void IncreaseCapacity(int size) { |
1696 accounting_stats_.ExpandSpace(size); | 1696 accounting_stats_.ExpandSpace(size); |
1697 } | 1697 } |
1698 | 1698 |
1699 // Releases an unused page and shrinks the space. | 1699 // Releases an unused page and shrinks the space. |
1700 void ReleasePage(Page* page); | 1700 void ReleasePage(Page* page, bool unlink); |
1701 | 1701 |
1702 // The dummy page that anchors the linked list of pages. | 1702 // The dummy page that anchors the linked list of pages. |
1703 Page* anchor() { return &anchor_; } | 1703 Page* anchor() { return &anchor_; } |
1704 | 1704 |
1705 #ifdef VERIFY_HEAP | 1705 #ifdef VERIFY_HEAP |
1706 // Verify integrity of this space. | 1706 // Verify integrity of this space. |
1707 virtual void Verify(ObjectVisitor* visitor); | 1707 virtual void Verify(ObjectVisitor* visitor); |
1708 | 1708 |
1709 // Overridden by subclasses to verify space-specific object | 1709 // Overridden by subclasses to verify space-specific object |
1710 // properties (e.g., only maps or free-list nodes are in map space). | 1710 // properties (e.g., only maps or free-list nodes are in map space). |
(...skipping 1112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2823 } | 2823 } |
2824 // Must be small, since an iteration is used for lookup. | 2824 // Must be small, since an iteration is used for lookup. |
2825 static const int kMaxComments = 64; | 2825 static const int kMaxComments = 64; |
2826 }; | 2826 }; |
2827 #endif | 2827 #endif |
2828 | 2828 |
2829 | 2829 |
2830 } } // namespace v8::internal | 2830 } } // namespace v8::internal |
2831 | 2831 |
2832 #endif // V8_SPACES_H_ | 2832 #endif // V8_SPACES_H_ |
OLD | NEW |