Commit 0326938e authored by Igor Sheludko's avatar Igor Sheludko Committed by Commit Bot

[zone-stats] Use Zone::DeleteArray<T>() in ZoneAllocator::deallocate()

Bug: v8:10572
Change-Id: I0caf2f4a36e21d889e931b75ec86bae5b1571511
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2302895Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Igor Sheludko <ishell@chromium.org>
Cr-Commit-Position: refs/heads/master@{#68920}
parent 99fc3806
......@@ -47,8 +47,8 @@ class ZoneAllocator {
template <typename U>
friend class ZoneAllocator;
T* allocate(size_t n) { return zone_->NewArray<T>(n); }
void deallocate(T* p, size_t) {} // noop for zones
T* allocate(size_t length) { return zone_->NewArray<T>(length); }
void deallocate(T* p, size_t length) { zone_->DeleteArray<T>(p, length); }
size_t max_size() const {
return std::numeric_limits<int>::max() / sizeof(T);
......
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