blob: 76d618cbfdb07a85b862a80c6a30b6cef2dc11e4 [file] [log] [blame]
// Copyright 2018 the V8 project authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "src/objects/heap-object.h"
// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"
namespace v8 {
namespace internal {
#include "torque-generated/src/objects/"
// 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 TorqueGeneratedFreeSpace<FreeSpace, HeapObject> {
// [size]: size of the free space including the header.
inline int relaxed_read_size() const;
inline void relaxed_write_size(int value);
inline int Size();
// Accessors for the next field.
inline FreeSpace next();
inline void set_next(FreeSpace next);
inline static FreeSpace cast(HeapObject obj);
inline static FreeSpace unchecked_cast(const Object obj);
// Dispatched behavior.
inline bool IsValid();
} // namespace internal
} // namespace v8
#include "src/objects/object-macros-undef.h"