| 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 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1225 // Slow path of AllocateRaw. This function is space-dependent. | 1225 // Slow path of AllocateRaw. This function is space-dependent. |
| 1226 MUST_USE_RESULT virtual HeapObject* SlowAllocateRaw(int size_in_bytes) = 0; | 1226 MUST_USE_RESULT virtual HeapObject* SlowAllocateRaw(int size_in_bytes) = 0; |
| 1227 | 1227 |
| 1228 // Slow path of MCAllocateRaw. | 1228 // Slow path of MCAllocateRaw. |
| 1229 MUST_USE_RESULT HeapObject* SlowMCAllocateRaw(int size_in_bytes); | 1229 MUST_USE_RESULT HeapObject* SlowMCAllocateRaw(int size_in_bytes); |
| 1230 | 1230 |
| 1231 #ifdef DEBUG | 1231 #ifdef DEBUG |
| 1232 // Returns the number of total pages in this space. | 1232 // Returns the number of total pages in this space. |
| 1233 int CountTotalPages(); | 1233 int CountTotalPages(); |
| 1234 #endif | 1234 #endif |
| 1235 |
| 1235 private: | 1236 private: |
| 1236 | |
| 1237 // Returns a pointer to the page of the relocation pointer. | 1237 // Returns a pointer to the page of the relocation pointer. |
| 1238 Page* MCRelocationTopPage() { return TopPageOf(mc_forwarding_info_); } | 1238 Page* MCRelocationTopPage() { return TopPageOf(mc_forwarding_info_); } |
| 1239 | 1239 |
| 1240 friend class PageIterator; | 1240 friend class PageIterator; |
| 1241 }; | 1241 }; |
| 1242 | 1242 |
| 1243 | 1243 |
| 1244 class NumberAndSizeInfo BASE_EMBEDDED { | 1244 class NumberAndSizeInfo BASE_EMBEDDED { |
| 1245 public: | 1245 public: |
| 1246 NumberAndSizeInfo() : number_(0), bytes_(0) {} | 1246 NumberAndSizeInfo() : number_(0), bytes_(0) {} |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1809 // destroyed. The start address should be word aligned. | 1809 // destroyed. The start address should be word aligned. |
| 1810 void Free(Address start); | 1810 void Free(Address start); |
| 1811 | 1811 |
| 1812 // Allocate a fixed sized block from the free list. The block is unitialized. | 1812 // Allocate a fixed sized block from the free list. The block is unitialized. |
| 1813 // A failure is returned if no block is available. | 1813 // A failure is returned if no block is available. |
| 1814 MUST_USE_RESULT MaybeObject* Allocate(); | 1814 MUST_USE_RESULT MaybeObject* Allocate(); |
| 1815 | 1815 |
| 1816 void MarkNodes(); | 1816 void MarkNodes(); |
| 1817 | 1817 |
| 1818 private: | 1818 private: |
| 1819 | |
| 1820 Heap* heap_; | 1819 Heap* heap_; |
| 1821 | 1820 |
| 1822 // Available bytes on the free list. | 1821 // Available bytes on the free list. |
| 1823 intptr_t available_; | 1822 intptr_t available_; |
| 1824 | 1823 |
| 1825 // The head of the free list. | 1824 // The head of the free list. |
| 1826 Address head_; | 1825 Address head_; |
| 1827 | 1826 |
| 1828 // The tail of the free list. | 1827 // The tail of the free list. |
| 1829 Address tail_; | 1828 Address tail_; |
| (...skipping 479 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2309 } | 2308 } |
| 2310 // Must be small, since an iteration is used for lookup. | 2309 // Must be small, since an iteration is used for lookup. |
| 2311 static const int kMaxComments = 64; | 2310 static const int kMaxComments = 64; |
| 2312 }; | 2311 }; |
| 2313 #endif | 2312 #endif |
| 2314 | 2313 |
| 2315 | 2314 |
| 2316 } } // namespace v8::internal | 2315 } } // namespace v8::internal |
| 2317 | 2316 |
| 2318 #endif // V8_SPACES_H_ | 2317 #endif // V8_SPACES_H_ |
| OLD | NEW |