[AGENT++] Hi, all, why these code lead to memry leak?
Jochen Katz
katz at agentpp.com
Mon Mar 1 21:32:03 CET 2010
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
More information about the AGENTPP
mailing list