Commit 4d9d256e authored by Omer Katz's avatar Omer Katz Committed by V8 LUCI CQ

[heap] Use allocation fast path for code and map spaces

Bug: chromium:1316121, v8:12612
Change-Id: I83d1b580e2bfd03ed36b174ff4503976c8bd1922
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3593115Reviewed-by: 's avatarMichael Lippautz <mlippautz@chromium.org>
Commit-Queue: Omer Katz <omerkatz@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80033}
parent f1b6092c
...@@ -105,11 +105,13 @@ V8_WARN_UNUSED_RESULT V8_INLINE AllocationResult HeapAllocator::AllocateRaw( ...@@ -105,11 +105,13 @@ V8_WARN_UNUSED_RESULT V8_INLINE AllocationResult HeapAllocator::AllocateRaw(
case AllocationType::kCode: case AllocationType::kCode:
DCHECK_EQ(alignment, AllocationAlignment::kTaggedAligned); DCHECK_EQ(alignment, AllocationAlignment::kTaggedAligned);
DCHECK(AllowCodeAllocation::IsAllowed()); DCHECK(AllowCodeAllocation::IsAllowed());
allocation = code_space()->AllocateRawUnaligned(size_in_bytes); allocation = code_space()->AllocateRaw(
size_in_bytes, AllocationAlignment::kTaggedAligned);
break; break;
case AllocationType::kMap: case AllocationType::kMap:
DCHECK_EQ(alignment, AllocationAlignment::kTaggedAligned); DCHECK_EQ(alignment, AllocationAlignment::kTaggedAligned);
allocation = space_for_maps()->AllocateRawUnaligned(size_in_bytes); allocation = space_for_maps()->AllocateRaw(
size_in_bytes, AllocationAlignment::kTaggedAligned);
break; break;
case AllocationType::kReadOnly: case AllocationType::kReadOnly:
DCHECK(read_only_space()->writable()); DCHECK(read_only_space()->writable());
......
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