Why not use the following option to dump memory usage? # Great for tracking down memory leaks, but you need to use the # ink allocators CONFIG proxy.config.dump_mem_info_frequency INT 0
I always use it to detect memory leak when working with freelist. There are two parts memory in ATS: 1) allocated by malloc()/new() directly. 2) managed by freelist memory pool. Firstly, we should judge out where the memory leak comes from? The above option can help you to judge. If memory leak comes from 2), you can find out which Class objects are leak by analyzing the dumping output. If memory leak comes from 1), you can use SystemTap to see whether the 'malloc()' and 'free()' are paired. On Thu, Jul 17, 2014 at 8:40 AM, Leif Hedstrom <zw...@apache.org> wrote: > > On Jul 16, 2014, at 12:07 PM, James Peach <jpe...@apache.org> wrote: > > > Sometimes I've gone to the extent of using placement new() in order to > be consistent about using TSmalloc+TSfree, but there's no additional memory > leak tracking in those. The only practical difference I can think of is > that if ATS is using tcmalloc, then this would ensure your plugin gets it > too. > > yeah, tcmalloc is nice (and easy to use with ATS). I’m not sure why > Valgrind isn’t working for you, best I can suggest is that you setup a dev > environment with CentOS7 or Fedora Core 20, and run it there ? I generally > find Valgrind easy to use, albeit, incredibly slow. > > Cheers, > > — Leif > > -- Yunkai Zhang Work at Taobao