#include "src/heap/spaces.h"
#include <memory>
#include "src/common/globals.h"
#include "src/execution/isolate.h"
#include "src/heap/heap-inl.h"
#include "src/heap/heap-write-barrier-inl.h"
#include "src/heap/heap.h"
#include "src/heap/large-spaces.h"
#include "src/heap/main-allocator.h"
#include "src/heap/mutable-page-metadata.h"
#include "src/heap/spaces-inl.h"
#include "test/unittests/test-utils.h"
namespace v8 {
namespace internal {
static Tagged<HeapObject> AllocateUnaligned(MainAllocator* allocator,
SpaceWithLinearArea* space,
int size) { … }
static Tagged<HeapObject> AllocateUnaligned(OldLargeObjectSpace* allocator,
OldLargeObjectSpace* space,
int size) { … }
using SpacesTest = TestWithIsolate;
TEST_F(SpacesTest, CompactionSpaceMerge) { … }
TEST_F(SpacesTest, WriteBarrierIsMarking) { … }
TEST_F(SpacesTest, WriteBarrierInYoungGenerationToSpace) { … }
TEST_F(SpacesTest, WriteBarrierInYoungGenerationFromSpace) { … }
TEST_F(SpacesTest, CodeRangeAddressReuse) { … }
TEST_F(SpacesTest, FreeListManySelectFreeListCategoryType) { … }
TEST_F(SpacesTest,
FreeListManyCachedFastPathSelectFastAllocationFreeListCategoryType) { … }
class Observer : public AllocationObserver { … };
template <typename T, typename A>
void testAllocationObserver(Isolate* i_isolate, T* space, A* allocator) { … }
TEST_F(SpacesTest, AllocationObserver) { … }
TEST_F(SpacesTest, InlineAllocationObserverCadence) { … }
}
}