On Wed, 13 Apr 2011 17:34:50 -0400
Simo Sorce <ssorce(a)redhat.com> wrote:
The operations we use to deleted members in the memberof plugin are
quite inefficient, but on top of that we were also "leaking" a lot of
search results on the operations contexts, causing the runtime memory
footprint to grow immensely (as in gigabytes for a singe ldb_modify).
It was technically not a leak beacuase eventually all memory would be
reclaimed, but it was enough to make the OOM killer kill our
processes.
After a deletion operation is finished, make sure to explicitly free
all the search results we do not need anymore, so that the footprint
remains low.
Attached an improved version of the patch that also properly clears the
structure so that in case of future modification of the module we do
not incur in potentially trying to use dangling pointers.
Simo.
--
Simo Sorce * Red Hat, Inc * New York