| OLD | NEW |
| 1 // Copyright 2006-2008 the V8 project authors. All rights reserved. | 1 // Copyright 2006-2008 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 1532 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1543 virtual Address PageAllocationTop(Page* page) { | 1543 virtual Address PageAllocationTop(Page* page) { |
| 1544 return page == TopPageOf(allocation_info_) ? top() | 1544 return page == TopPageOf(allocation_info_) ? top() |
| 1545 : page->ObjectAreaEnd() - page_extra_; | 1545 : page->ObjectAreaEnd() - page_extra_; |
| 1546 } | 1546 } |
| 1547 | 1547 |
| 1548 int object_size_in_bytes() { return object_size_in_bytes_; } | 1548 int object_size_in_bytes() { return object_size_in_bytes_; } |
| 1549 | 1549 |
| 1550 // Give a fixed sized block of memory to the space's free list. | 1550 // Give a fixed sized block of memory to the space's free list. |
| 1551 void Free(Address start) { | 1551 void Free(Address start) { |
| 1552 free_list_.Free(start); | 1552 free_list_.Free(start); |
| 1553 accounting_stats_.DeallocateBytes(Map::kSize); | 1553 accounting_stats_.DeallocateBytes(object_size_in_bytes_); |
| 1554 } | 1554 } |
| 1555 | 1555 |
| 1556 // Prepares for a mark-compact GC. | 1556 // Prepares for a mark-compact GC. |
| 1557 virtual void PrepareForMarkCompact(bool will_compact); | 1557 virtual void PrepareForMarkCompact(bool will_compact); |
| 1558 | 1558 |
| 1559 // Updates the allocation pointer to the relocation top after a mark-compact | 1559 // Updates the allocation pointer to the relocation top after a mark-compact |
| 1560 // collection. | 1560 // collection. |
| 1561 virtual void MCCommitRelocationInfo(); | 1561 virtual void MCCommitRelocationInfo(); |
| 1562 | 1562 |
| 1563 #ifdef DEBUG | 1563 #ifdef DEBUG |
| (...skipping 248 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1812 | 1812 |
| 1813 private: | 1813 private: |
| 1814 LargeObjectChunk* current_; | 1814 LargeObjectChunk* current_; |
| 1815 HeapObjectCallback size_func_; | 1815 HeapObjectCallback size_func_; |
| 1816 }; | 1816 }; |
| 1817 | 1817 |
| 1818 | 1818 |
| 1819 } } // namespace v8::internal | 1819 } } // namespace v8::internal |
| 1820 | 1820 |
| 1821 #endif // V8_SPACES_H_ | 1821 #endif // V8_SPACES_H_ |
| OLD | NEW |