| // Copyright 2020 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 "include/cppgc/allocation.h" |
| #include "src/base/logging.h" |
| #include "src/base/macros.h" |
| #include "src/heap/cppgc/object-allocator.h" |
| STATIC_ASSERT(api_constants::kLargeObjectSizeThreshold == |
| kLargeObjectSizeThreshold); |
| void* MakeGarbageCollectedTraitInternal::Allocate( |
| cppgc::AllocationHandle& handle, size_t size, GCInfoIndex index) { |
| return static_cast<ObjectAllocator&>(handle).AllocateObject(size, index); |
| void* MakeGarbageCollectedTraitInternal::Allocate( |
| cppgc::AllocationHandle& handle, size_t size, GCInfoIndex index, |
| CustomSpaceIndex space_index) { |
| return static_cast<ObjectAllocator&>(handle).AllocateObject(size, index, |