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 1463 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1474 | 1474 |
1475 // Virtual function in the superclass. Allocate linearly at the start of | 1475 // Virtual function in the superclass. Allocate linearly at the start of |
1476 // the page after current_page (there is assumed to be one). | 1476 // the page after current_page (there is assumed to be one). |
1477 HeapObject* AllocateInNextPage(Page* current_page, int size_in_bytes); | 1477 HeapObject* AllocateInNextPage(Page* current_page, int size_in_bytes); |
1478 | 1478 |
1479 private: | 1479 private: |
1480 // The space's free list. | 1480 // The space's free list. |
1481 MapSpaceFreeList free_list_; | 1481 MapSpaceFreeList free_list_; |
1482 | 1482 |
1483 // An array of page start address in a map space. | 1483 // An array of page start address in a map space. |
1484 Address page_addresses_[kMaxMapPageIndex]; | 1484 Address page_addresses_[kMaxMapPageIndex + 1]; |
1485 | 1485 |
1486 public: | 1486 public: |
1487 TRACK_MEMORY("MapSpace") | 1487 TRACK_MEMORY("MapSpace") |
1488 }; | 1488 }; |
1489 | 1489 |
1490 | 1490 |
1491 // ----------------------------------------------------------------------------- | 1491 // ----------------------------------------------------------------------------- |
1492 // Large objects ( > Page::kMaxHeapObjectSize ) are allocated and managed by | 1492 // Large objects ( > Page::kMaxHeapObjectSize ) are allocated and managed by |
1493 // the large object space. A large object is allocated from OS heap with | 1493 // the large object space. A large object is allocated from OS heap with |
1494 // extra padding bytes (Page::kPageSize + Page::kObjectStartOffset). | 1494 // extra padding bytes (Page::kPageSize + Page::kObjectStartOffset). |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1654 | 1654 |
1655 private: | 1655 private: |
1656 LargeObjectChunk* current_; | 1656 LargeObjectChunk* current_; |
1657 HeapObjectCallback size_func_; | 1657 HeapObjectCallback size_func_; |
1658 }; | 1658 }; |
1659 | 1659 |
1660 | 1660 |
1661 } } // namespace v8::internal | 1661 } } // namespace v8::internal |
1662 | 1662 |
1663 #endif // V8_SPACES_H_ | 1663 #endif // V8_SPACES_H_ |
OLD | NEW |