[AGENT++] Hi, all, why these code lead to memry leak?

Jochen Katz katz at agentpp.com
Wed Mar 3 20:30:09 CET 2010


Hi,

the cause of the problem was that the add_row() function was called
twice witht the same index.

Regards,
  Jochen


> 2010/3/2 Jochen Katz <katz at agentpp.com>:
>> Hi,
>>
>>> It seems clear&add_row frequently will cause memory leak.
>>
>> I don't think so. I modified the atm_mib example to endlessly use the
>> two functions and memory usage does not increase.
>>
>> How does your set_row function look like? does the memory usage also
>> increase if you don't call set_row? Are you using the latest agent++?
>>
>> Regards,
>>  Jochen
>>
>>
>>
>>> 2010/3/1 cheng wan <wancheng82 at gmail.com>:
>>>> The code below is main for:
>>>> 1)Get tcp info from /proc/net/tcp.
>>>> 2)tcp_conn_table_index() is to compute the index of tcpConnEntry.
>>>>   Indexes:     1: tcpConnLocalAddress
>>>>        2: tcpConnLocalPort
>>>>        3: tcpConnRemAddress
>>>>        4: tcpConnRemPort
>>>> 3)Before add one row to   tcpConnEntry::instance, I use
>>>> tcpConnEntry::instance->clear() to clear all the rows
>>>> 4)get_proc_net_tcp() is excuted by one 2 seconds timer
>> _______________________________________________
>> AGENTPP mailing list
>> AGENTPP at agentpp.org
>> http://lists.agentpp.org/mailman/listinfo/agentpp
>>
> 



More information about the AGENTPP mailing list