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

Unified Diff: runtime/vm/malloc_hooks_tcmalloc.cc

Issue 2966593002: Updated native memory allocation profiling to use its own sample buffer instead of sharing a sample… (Closed)
Patch Set: Updated native memory allocation profiling to use its own sample buffer instead of sharing a sample… Created 3 years, 5 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 | « no previous file | runtime/vm/malloc_hooks_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/malloc_hooks_tcmalloc.cc
diff --git a/runtime/vm/malloc_hooks_tcmalloc.cc b/runtime/vm/malloc_hooks_tcmalloc.cc
index e4a5b86044bd4a18984611e1b095cebef2feae48..e5a1a23e02c73a97c10694afe93ffeab55bc6f75 100644
--- a/runtime/vm/malloc_hooks_tcmalloc.cc
+++ b/runtime/vm/malloc_hooks_tcmalloc.cc
@@ -143,6 +143,12 @@ class AllocationInfo {
}
}
+ ~AllocationInfo() {
+ if (sample_ != NULL) {
+ Profiler::allocation_sample_buffer()->FreeAllocationSample(sample_);
+ }
+ }
+
Sample* sample() const { return sample_; }
intptr_t allocation_size() const { return allocation_size_; }
« no previous file with comments | « no previous file | runtime/vm/malloc_hooks_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698