From: Kostka B. <ko...@to...> - 2013-08-12 13:46:27
|
Hi Anthony, Thanks for the patch to DirectoryIndexReader. I incorporated it to memleak_fixes branch. I also merged bs2_memoryleak_fix branch provided by Veit into memleak_fixes branch. I'm going to merge everything into master soon (I want to run do some more tests before) Regards Borek > -----Original Message----- > From: Anthony Novatsis [mailto:ant...@gm...] > Sent: Saturday, August 10, 2013 12:56 AM > To: clu...@li... > Subject: Re: [CLucene-dev] All remaining memory leaks in tests > (hopefully) removed > > Hi Borek, > > Thank you very much for creating the memleak_fixes branch! > > We have actually seen some other memory leaks during testing. > > Firstly when DirectoryIndexReader::startCommit is called consecutively, > rollbackSegmentInfos is not freed if it was previously allocated. The > below patch fixes the leak and could be incorporated into your branch > if not already addressed (somebody with better knowledge of the library > may also want to review): > > --- a/clucene-core- > 2.3.3.4/src/core/CLucene/index/DirectoryIndexReader.cpp > +++ b/clucene-core- > 2.3.3.4/src/core/CLucene/index/DirectoryIndexReader.c > +++ pp > @@ -274,6 +274,9 @@ CL_NS_DEF(index) > */ > void DirectoryIndexReader::startCommit() { > if (segmentInfos != NULL) { > + if (rollbackSegmentInfos != NULL) { > + _CLDELETE(rollbackSegmentInfos); > + } > rollbackSegmentInfos = segmentInfos->clone(); > } > rollbackHasChanges = hasChanges; > > Secondly, we are seeing many leaks of > lucene::index::MergePolicy::OneMerge and lucene::index::SegmentInfos. > Unfortunately, I do not yet have a patch as I haven't been able to > investigate but will do so in the coming weeks. > > I am eager to see your branch merged into master to use that as the > basis for further memory leak investigation. Thanks again! > > Best regards, > Anthony > > ----------------------------------------------------------------------- > ------- > Get 100% visibility into Java/.NET code with AppDynamics Lite! > It's a free troubleshooting tool designed for production. > Get down to code-level detail for bottlenecks, with <2% overhead. > Download for free and get started troubleshooting in minutes. > http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.cl > ktrk > _______________________________________________ > CLucene-developers mailing list > CLu...@li... > https://lists.sourceforge.net/lists/listinfo/clucene-developers |