On Mon, 29 Nov 2004 12:19:50 -0500, Coders Robert Story
<[EMAIL PROTECTED]> wrote:
> On Mon, 29 Nov 2004 13:08:17 +0100 P wrote:
> PK> I've implemented some tables using mfd and there is memory leak. Leak
> PK> occurs when I do snmpwalk on that table. I'm allmost sure, that bug is
> PK> somewhere in generated code.
> PK> When I do 'snmpwalk -On localhost oneIntegerFieldFromTable' leak is
> PK> about 16bytes per one received row. Same on whole table gives about
> PK> 1.4k bytes per received table.
> 
> Hmmm.. I'll take a look. Can you send me your default-table-*.m2c file?

I've made testcase :) In attachemnt there are:
MEM-LEAK.txt mib file
code generated by mib2c.mfd.conf memleakTable
I'ed turned off values maping and examples annd added some (trivial)
code in memleakTable_data_access.c file.
Use "m" file to compile and link to .so file. Then add this as
,,dynamicaly loaded extension'' to snmpd. Then run:
while : ; do snmpwalk localhost memleakTable; done
and watch (for example in  top) snmpd memory usage. It incrases quite
fast (more then 100kb per second on my machine).

Thank You for looking at that,
Pawel Kolodziej

Attachment: memleak.tgz
Description: Binary data

Reply via email to