Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(253)

Unified Diff: src/spaces.h

Issue 10918067: Refactoring of snapshots. This simplifies and improves (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: Created 8 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/snapshot-empty.cc ('k') | src/spaces.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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();
« no previous file with comments | « src/snapshot-empty.cc ('k') | src/spaces.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698