Index: src/spaces.h |
=================================================================== |
--- src/spaces.h (revision 12497) |
+++ src/spaces.h (working copy) |
@@ -790,14 +790,6 @@ |
virtual void Print() = 0; |
#endif |
- // After calling this we can allocate a certain number of bytes using only |
- // linear allocation (with a LinearAllocationScope and an AlwaysAllocateScope) |
- // without using freelists or causing a GC. This is used by partial |
- // snapshots. It returns true of space was reserved or false if a GC is |
- // needed. For paged spaces the space requested must include the space wasted |
- // at the end of each when allocating linearly. |
- virtual bool ReserveSpace(int bytes) = 0; |
- |
private: |
Heap* heap_; |
AllocationSpace id_; |
@@ -1318,6 +1310,11 @@ |
inline void Zap(); |
+ static inline FreeListNode* cast(MaybeObject* maybe) { |
+ ASSERT(!maybe->IsFailure()); |
+ return reinterpret_cast<FreeListNode*>(maybe); |
+ } |
+ |
private: |
static const int kNextOffset = POINTER_SIZE_ALIGN(FreeSpace::kHeaderSize); |
@@ -1380,6 +1377,9 @@ |
bool IsVeryLong(); |
#endif |
+ // Used after booting the VM. |
+ void RepairLists(Heap* heap); |
+ |
struct SizeStats { |
intptr_t Total() { |
return small_size_ + medium_size_ + large_size_ + huge_size_; |
@@ -1460,6 +1460,10 @@ |
// linear in the number of objects in the page. It may be slow. |
MUST_USE_RESULT MaybeObject* FindObject(Address addr); |
+ // During boot the free_space_map is created, and afterwards we may need |
+ // to write it into the free list nodes that were already created. |
+ virtual void RepairFreeListsAfterBoot(); |
+ |
// Prepares for a mark-compact GC. |
virtual void PrepareForMarkCompact(); |