On Jul 16, 2014, at 10:54 AM, Acácio Centeno <acacio.cent...@azion.com> wrote:

>>> Also we're creating and deleting some objects using new / delete. Could
>>> that be a problem?
> 
>> Sure, those objects could leak.
> 
> I'm sorry, the sentence was not good, I meant using new / delete instead of
> TSmalloc / TSfree. :-)

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.

> 
> 
> Acácio Centeno
> Software Engineering
> Azion Technologies
> Porto Alegre, Brasil +55 51 3012 3005 | +55 51 8118 9947
> Miami, USA +1 305 704 8816
> 
> Quaisquer informações contidas neste e-mail e anexos podem ser
> confidenciais e privilegiadas, protegidas por sigilo legal. Qualquer forma
> de utilização deste documento depende de autorização do emissor, sujeito as
> penalidades cabíveis.
> 
> Any information in this e-mail and attachments may be confidential and
> privileged, protected by legal confidentiality. The use of this document
> require authorization by the issuer, subject to penalties.
> 
> 
> 
> On Wed, Jul 16, 2014 at 2:15 PM, James Peach <jpe...@apache.org> wrote:
> 
>> On Jul 16, 2014, at 10:03 AM, Acácio Centeno <acacio.cent...@azion.com>
>> wrote:
>> 
>>> Hello,
>>> 
>>> One of our plugins is leaking memory and we can't find where. Do you guys
>>> have any mechanism in place to help find where the problem is?
>>> 
>>> I found an old doc about how to run under Valgrind, by compiling with
>>> --disable-freelist, but even doing so I'm unable to run under Valgrind
>> (on
>>> CentOS 6) due to instructions it does not recognize.
>> 
>> That's what I do to detect leaks, except that I typically run the leaks(1)
>> command on OS X to find the leaks.
>> 
>> 
>> https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man1/leaks.1.html
>> 
>> I think that you can do something similar with tcmalloc:
>> 
>> http://goog-perftools.sourceforge.net/doc/heap_checker.html
>> 
>>> 
>>> We believe the problem could be on a TSIOBuffer, but we're certain that
>>> we're calling TSIOBufferDestroy on it. Is there some condition under
>> which
>>> even calling this function would not release the buffer's memory?
>>> 
>>> Also we're creating and deleting some objects using new / delete. Could
>>> that be a problem?
>> 
>> Sure, those objects could leak.
>> 
>>> 
>>> Thanks,
>>> Acácio Centeno
>>> Software Engineering
>>> Azion Technologies
>>> Porto Alegre, Brasil +55 51 3012 3005 | +55 51 8118 9947
>>> Miami, USA +1 305 704 8816
>>> 
>>> Quaisquer informações contidas neste e-mail e anexos podem ser
>>> confidenciais e privilegiadas, protegidas por sigilo legal. Qualquer
>> forma
>>> de utilização deste documento depende de autorização do emissor, sujeito
>> as
>>> penalidades cabíveis.
>>> 
>>> Any information in this e-mail and attachments may be confidential and
>>> privileged, protected by legal confidentiality. The use of this document
>>> require authorization by the issuer, subject to penalties.
>> 
>> 

Reply via email to