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

Unified Diff: runtime/vm/profiler.cc

Issue 92513002: Switch SetupIsolateForProfiling to use calloc instead of new [] (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 1 month 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.cc
diff --git a/runtime/vm/profiler.cc b/runtime/vm/profiler.cc
index 90d5a46ac786653e7b944a93b757e9aeb6c1a12c..006f032d36e5bab3cb5f4fc8aa9cee561d608b59 100644
--- a/runtime/vm/profiler.cc
+++ b/runtime/vm/profiler.cc
@@ -579,13 +579,13 @@ SampleBuffer::SampleBuffer(intptr_t capacity) {
start_ = 0;
end_ = 0;
capacity_ = capacity;
- samples_ = new Sample[capacity];
+ samples_ = reinterpret_cast<Sample*>(calloc(capacity, sizeof(Sample)));
}
SampleBuffer::~SampleBuffer() {
if (samples_ != NULL) {
- delete[] samples_;
+ free(samples_);
samples_ = NULL;
}
siva 2013/11/27 21:01:55 for completeness: start_ = 0; end_ = 0; capaci
Cutch 2013/11/27 21:48:56 Done.
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698