> RS> Ugh. The iterator style mfd code is the least tested aspect > RS> of this code.
Oh well, I guess someone has to be the guinea pig and do some application testing at some point :) > RS> rowreq_ctx->rowreq_flags |= (MFD_ROW_DELETED | MFD_ROW_CREATED); > > RS> I think that will work, but it may cause other side effects > RS> (especially if your table supports row creation). Give it a > RS> whirl and let me know how it goes.. Yes, I've tried this and it seems to be working much better now (no memory leak). My current table I've implemented doesn't support row creation - but I do have one in the future that will. I'll keep you updated if there are any side effects. One other minor issue for this mfd code (which is easily fixed after the code generation). In the <table>_interface.c code there is a call to a function "_<table>_container_shutdown" in function "_<table>_shutdown_interface". Unfortunately no container_shutdown function exists. For the minute I've just commented out this call together with the function declaration at the top of the file. Cheers Graeme > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On > Behalf Of Robert Story > Sent: 28 June 2007 18:34 > To: Graeme Wilson > Cc: [email protected] > Subject: Re: Memory leak in agent code using mfd > > On Thu, 28 Jun 2007 16:46:09 +0100 Graeme wrote: > GW> ==12187== by 0x8049EF0: <table>_loop_get_first > GW> (<table>_data_access.c:213) > GW> ==12187== by 0x804C222: _<table>_loop_get_first_wrapper > GW> (<table>_interface.c:753) > > Ugh. The iterator style mfd code is the least tested aspect > of this code. > > I've just run through it again, after many years, and I think > I see a problem, which may or may not be the issue. The issue > is that the rest of the MFD code isn't expecting rowreq > contexts to be ephemeral. So, what's needed is a way to tell > the rest of the code to release the context when it's done > with it. Using the existing code, it may be as simple as > adding the following line in the allocat_rowreq function in > <table>_interface.c: > > rowreq_ctx->rowreq_flags |= (MFD_ROW_DELETED | MFD_ROW_CREATED); > > I think that will work, but it may cause other side effects > (especially if your table supports row creation). Give it a > whirl and let me know how it goes.. > > -------------------------------------------------------------- > ----------- > This SF.net email is sponsored by DB2 Express Download DB2 > Express C - the FREE version of DB2 express and take control > of your XML. No limits. Just data. Click to get it now. > http://sourceforge.net/powerbar/db2/ > _______________________________________________ > Net-snmp-coders mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/net-snmp-coders > > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Net-snmp-coders mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/net-snmp-coders
