| Index: src/objects.h
|
| diff --git a/src/objects.h b/src/objects.h
|
| index 51755054cb00a3513faae0b6c5684ce5473f105e..80ab91956b647041532acb280d5e611443c5a303 100644
|
| --- a/src/objects.h
|
| +++ b/src/objects.h
|
| @@ -4448,8 +4448,11 @@ class ByteArray: public FixedArrayBase {
|
| };
|
|
|
|
|
| -// FreeSpace represents fixed sized areas of the heap that are not currently in
|
| -// use. Used by the heap and GC.
|
| +// 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.
|
| class FreeSpace: public HeapObject {
|
| public:
|
| // [size]: size of the free space including the header.
|
| @@ -4461,7 +4464,12 @@ class FreeSpace: public HeapObject {
|
|
|
| inline int Size() { return size(); }
|
|
|
| - DECLARE_CAST(FreeSpace)
|
| + // Accessors for the next field.
|
| + inline FreeSpace* next();
|
| + inline FreeSpace** next_address();
|
| + inline void set_next(FreeSpace* next);
|
| +
|
| + inline static FreeSpace* cast(HeapObject* obj);
|
|
|
| // Dispatched behavior.
|
| DECLARE_PRINTER(FreeSpace)
|
| @@ -4470,9 +4478,7 @@ class FreeSpace: public HeapObject {
|
| // Layout description.
|
| // Size is smi tagged when it is stored.
|
| static const int kSizeOffset = HeapObject::kHeaderSize;
|
| - static const int kHeaderSize = kSizeOffset + kPointerSize;
|
| -
|
| - static const int kAlignedSize = OBJECT_POINTER_ALIGN(kHeaderSize);
|
| + static const int kNextOffset = POINTER_SIZE_ALIGN(kSizeOffset + kPointerSize);
|
|
|
| private:
|
| DISALLOW_IMPLICIT_CONSTRUCTORS(FreeSpace);
|
|
|