Clean up Scoped-/ArenaAlocator array allocations.
Change-Id: Id718f8a4450adf1608306286fa4e6b9194022532
diff --git a/compiler/utils/arena_containers.h b/compiler/utils/arena_containers.h
index 8252591..a7a7438 100644
--- a/compiler/utils/arena_containers.h
+++ b/compiler/utils/arena_containers.h
@@ -161,8 +161,7 @@
pointer allocate(size_type n, ArenaAllocatorAdapter<void>::pointer hint = nullptr) {
UNUSED(hint);
DCHECK_LE(n, max_size());
- return reinterpret_cast<T*>(arena_allocator_->Alloc(n * sizeof(T),
- ArenaAllocatorAdapterKind::Kind()));
+ return arena_allocator_->AllocArray<T>(n, ArenaAllocatorAdapterKind::Kind());
}
void deallocate(pointer p, size_type n) {
UNUSED(p, n);