diff options
author | KernelMaker <songzhao.asm@icloud.com> | 2017-05-24 16:46:49 +0800 |
---|---|---|
committer | Aliaksey Kandratsenka <alkondratenko@gmail.com> | 2017-05-29 15:05:55 -0700 |
commit | a495969cb6157cc361fc03228ae12ff7c0ecac4b (patch) | |
tree | 1a042d7ab09a6c554d0a014ee0877059eaff1d68 | |
parent | 163224d8af5abdbbd8208ad6d37f13fb450af46f (diff) | |
download | gperftools-a495969cb6157cc361fc03228ae12ff7c0ecac4b.tar.gz |
update the prev_class_size in each loop, or the min_object_size of tcmalloc.thread will always be 1 when calling GetFreeListSizes
-rw-r--r-- | src/tcmalloc.cc | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tcmalloc.cc b/src/tcmalloc.cc index c6edefd..377d3fa 100644 --- a/src/tcmalloc.cc +++ b/src/tcmalloc.cc @@ -868,6 +868,8 @@ class TCMallocImplementation : public MallocExtension { class_count[cl] * Static::sizemap()->ByteSizeForClass(cl); i.type = kThreadCacheType; v->push_back(i); + + prev_class_size = Static::sizemap()->ByteSizeForClass(cl); } // append page heap info |