Commit f542fdef authored by Manos Koukoutos's avatar Manos Koukoutos Committed by Commit Bot

[zone] Remove redundant size roundup in Zone

Change-Id: I2859b2f83a1b3a8f70f906f698a8531796b767af
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2436332Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Manos Koukoutos <manoskouk@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70193}
parent 10793208
...@@ -108,7 +108,6 @@ void AccountingAllocator::ReturnSegment(Segment* segment, ...@@ -108,7 +108,6 @@ void AccountingAllocator::ReturnSegment(Segment* segment,
segment->ZapHeader(); segment->ZapHeader();
if (COMPRESS_ZONES_BOOL && supports_compression) { if (COMPRESS_ZONES_BOOL && supports_compression) {
CHECK(FreePages(bounded_page_allocator_.get(), segment, segment_size)); CHECK(FreePages(bounded_page_allocator_.get(), segment, segment_size));
} else { } else {
free(segment); free(segment);
} }
......
...@@ -104,8 +104,7 @@ class V8_EXPORT_PRIVATE Zone final { ...@@ -104,8 +104,7 @@ class V8_EXPORT_PRIVATE Zone final {
// associated with the T type. // associated with the T type.
template <typename T, typename... Args> template <typename T, typename... Args>
T* New(Args&&... args) { T* New(Args&&... args) {
size_t size = RoundUp(sizeof(T), kAlignmentInBytes); void* memory = Allocate<T>(sizeof(T));
void* memory = Allocate<T>(size);
return new (memory) T(std::forward<Args>(args)...); return new (memory) T(std::forward<Args>(args)...);
} }
......
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