blob: 32f917da5ac912546caad26615ef827a8ec49d8d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// 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/heap-inl.h"
namespace cppgc {
namespace internal {
STATIC_ASSERT(api_constants::kLargeObjectSizeThreshold ==
kLargeObjectSizeThreshold);
// static
void* MakeGarbageCollectedTraitInternal::Allocate(cppgc::Heap* heap,
size_t size,
GCInfoIndex index) {
DCHECK_NOT_NULL(heap);
return Heap::From(heap)->Allocate(size, index);
}
// static
void* MakeGarbageCollectedTraitInternal::Allocate(
cppgc::Heap* heap, size_t size, GCInfoIndex index,
CustomSpaceIndex space_index) {
DCHECK_NOT_NULL(heap);
return Heap::From(heap)->Allocate(size, index, space_index);
}
} // namespace internal
} // namespace cppgc
|