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

Unified Diff: src/objects.h

Issue 882443004: Revert of Only use FreeSpace objects in the free list. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 11 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/isolate.h ('k') | src/objects-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 80ab91956b647041532acb280d5e611443c5a303..51755054cb00a3513faae0b6c5684ce5473f105e 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -4448,11 +4448,8 @@
};
-// FreeSpace are fixed-size free memory blocks used by the heap and GC.
-// They look like heap objects (are heap object tagged and have a map) so that
-// the heap remains iterable. They have a size and a next pointer.
-// The next pointer is the raw address of the next FreeSpace object (or NULL)
-// in the free list.
+// FreeSpace represents fixed sized areas of the heap that are not currently in
+// use. Used by the heap and GC.
class FreeSpace: public HeapObject {
public:
// [size]: size of the free space including the header.
@@ -4464,12 +4461,7 @@
inline int Size() { return size(); }
- // Accessors for the next field.
- inline FreeSpace* next();
- inline FreeSpace** next_address();
- inline void set_next(FreeSpace* next);
-
- inline static FreeSpace* cast(HeapObject* obj);
+ DECLARE_CAST(FreeSpace)
// Dispatched behavior.
DECLARE_PRINTER(FreeSpace)
@@ -4478,7 +4470,9 @@
// Layout description.
// Size is smi tagged when it is stored.
static const int kSizeOffset = HeapObject::kHeaderSize;
- static const int kNextOffset = POINTER_SIZE_ALIGN(kSizeOffset + kPointerSize);
+ static const int kHeaderSize = kSizeOffset + kPointerSize;
+
+ static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
private:
DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace);
« no previous file with comments | « src/isolate.h ('k') | src/objects-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698