Memory leakage

"Pöri, Pasi" pasi.pori____teleste.com
Tue Jan 29 15:24:30 CET 2002


Hi Frank,

I have not been able to find the cause for memory leakage. It seems
following code in some how causes it:

Here are the code fragments I'm using for adding the row to the log table:

...
	Oidx oidx(dwAlarmLogLastIndex++);
	MibTableRow *r = alarmLogEntry::instance->add_row(oidx);
	OctetStr oStr((BYTE*)&buf[1], pos-1);
	alarmLogEntry::instance->set_row(r, dwAlarmLogLastIndex, oStr);
...

And for removal:

...
		int ind = 0;
		Oidx oidx(ind);
		MibLeaf *l = alarmLogEntry::instance->find_next(oidx);
		if (l) {
			Oidx index = l->get_reference_to_row()->get_index();
			alarmLogEntry::instance->remove_row(index);
		}
...

This is some how a ring buffer type FIFO alarm log, where I just keep track
on how many rows there are and the first row will be deleted. Not very
sophisticated coding, but still should work?

It would be highly appreciated if You could be more specific about the
snmpRowStatus memory leakage bug and could it relate to my case.

Best Regards,

Pasi




More information about the AGENTPP mailing list