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

Unified Diff: runtime/vm/profiler.h

Issue 2955493002: Allocate the profiler sample buffer and zone segments with virtual memory instead of malloc. (Closed)
Patch Set: . Created 3 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/heap.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler.h
diff --git a/runtime/vm/profiler.h b/runtime/vm/profiler.h
index 8972fe0ee42e9e2af3a21c6e2525a2db43f1dacc..f8107e49d2999e312e3e08ec9340fcb14b137dc1 100644
--- a/runtime/vm/profiler.h
+++ b/runtime/vm/profiler.h
@@ -521,15 +521,7 @@ class SampleBuffer {
static const intptr_t kDefaultBufferCapacity = 120000; // 2 minutes @ 1000hz.
explicit SampleBuffer(intptr_t capacity = kDefaultBufferCapacity);
-
- ~SampleBuffer() {
- if (samples_ != NULL) {
- free(samples_);
- samples_ = NULL;
- cursor_ = 0;
- capacity_ = 0;
- }
- }
+ ~SampleBuffer();
intptr_t capacity() const { return capacity_; }
@@ -575,6 +567,7 @@ class SampleBuffer {
const CodeLookupTable& clt);
Sample* Next(Sample* sample);
+ VirtualMemory* memory_;
Sample* samples_;
intptr_t capacity_;
uintptr_t cursor_;
« no previous file with comments | « runtime/vm/heap.cc ('k') | runtime/vm/profiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698