Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(792)

Unified Diff: runtime/vm/class_table.cc

Issue 16271010: Use 'new' in all the snapshot reallocation functions instead of realloc. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/code_observers.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_table.cc
===================================================================
--- runtime/vm/class_table.cc (revision 23633)
+++ runtime/vm/class_table.cc (working copy)
@@ -61,8 +61,8 @@
if (top_ == capacity_) {
// Grow the capacity of the class table.
intptr_t new_capacity = capacity_ + capacity_increment_;
- RawClass** new_table = reinterpret_cast<RawClass**>(
- realloc(table_, new_capacity * sizeof(RawClass*))); // NOLINT
+ RawClass** new_table = Utils::Realloc(table_, capacity_, new_capacity);
+ ASSERT(new_capacity > capacity_);
for (intptr_t i = capacity_; i < new_capacity; i++) {
new_table[i] = NULL;
}
« no previous file with comments | « runtime/vm/benchmark_test.cc ('k') | runtime/vm/code_observers.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698