Commit 0e7cb821 authored by Steve Blackburn's avatar Steve Blackburn Committed by Commit Bot

Add alignment to TPH API.

Bug: v8:9533
Change-Id: I11ae71b552d2ba96606e99261092d99dc92e680f
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1995266
Commit-Queue: Steve Blackburn <steveblackburn@google.com>
Reviewed-by: 's avatarUlan Degenbaev <ulan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#65843}
parent 67702104
......@@ -203,7 +203,7 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationType type,
}
} else if (AllocationType::kCode == type) {
if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) {
allocation = tp_heap_->AllocateCode(size_in_bytes);
allocation = tp_heap_->AllocateCode(size_in_bytes, alignment);
} else if (size_in_bytes <= code_space()->AreaSize() && !large_object) {
allocation = code_space_->AllocateRawUnaligned(size_in_bytes);
} else {
......@@ -220,7 +220,7 @@ AllocationResult Heap::AllocateRaw(int size_in_bytes, AllocationType type,
allocation =
read_only_space_->AllocateRaw(size_in_bytes, alignment, origin);
} else if (V8_ENABLE_THIRD_PARTY_HEAP_BOOL) {
allocation = tp_heap_->Allocate(size_in_bytes);
allocation = tp_heap_->Allocate(size_in_bytes, alignment);
} else {
UNREACHABLE();
}
......
......@@ -18,9 +18,10 @@ class Heap {
static v8::Isolate* GetIsolate(Address address);
AllocationResult Allocate(size_t size_in_bytes);
AllocationResult Allocate(size_t size_in_bytes, AllocationAlignment align);
AllocationResult AllocateCode(size_t size_in_bytes);
AllocationResult AllocateCode(size_t size_in_bytes,
AllocationAlignment align);
Address GetObjectFromInnerPointer(Address inner_pointer);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment