Open GoogleCodeExporter opened 9 years ago
I will need more details on what exactly is a problem, on proposed fix and on
what exactly your test program is proving.
Original comment by alkondratenko
on 1 Mar 2015 at 1:27
New fixed code :
common.h:132
- static const int kMaxDynamicFreeListLength = 8192;
+ static const int kMaxDynamicFreeListLength = 8192 * 2;
After ran long long time with many threads(>500),the tcmalloc may enter a
state:thread cache fetch from cental cache and release cache to central cache
frequent.
Why?
the min freelist: his size is 8,maxlength is 8192,but his batch size is 8192
too,so ,we can build many cases that call malloc/free times << 8192 and enter
the wrong state .
Guess:
On 32 bit platform,the min (his size is 8)freelist 's maxlength is 8192,his
batch size is 4096,so the wrong state can not appare.
But my paltform is 64 bit.
So:
the whole fix maybe like:
#ifdef _LP64
static const int kMaxDynamicFreeListLength = 8192 * 2;
#else
static const int kMaxDynamicFreeListLength = 8192;
#endif
Original comment by fanzheny...@163.com
on 19 Mar 2015 at 9:16
Sorry, but I'm still not able to see what the problem is.
Can you please elaborate more on that part rather than proposed solution ?
Original comment by alkondratenko
on 22 Mar 2015 at 6:23
Original issue reported on code.google.com by
fanzheny...@163.com
on 26 Feb 2015 at 6:28