On Fri, May 08, 2009 at 01:16:51AM +0530, Balbir Singh wrote:
> * Dhaval Giani <[email protected]> [2009-04-13 16:41:55]:
> 
> > On Mon, Apr 13, 2009 at 04:38:04PM +0530, Dhaval Giani wrote:
> > > On Wed, Apr 08, 2009 at 05:33:01PM +0900, Ken'ichi Ohmichi wrote:
> > > > 
> > > > Hi,
> > > > 
> > > > I tested a cgrlesengd daemon with huge load, which makes many 'su',
> > > > in long time. And the daemon was killed by an OOM killer. So the
> > > > daemon has memory leak. This patch fixes this problem.
> > > > 
> > > > The daemon allocates memory at cg_prepare_cgroup(), but it does not
> > > > free the memory. This patch adds necessary free() to cgroup_change_
> > > > cgroup_path by calling cgroup_free_controllers(). In addition, this
> > > > patch adds free()s for handling error and flushes the counters of the
> > > > allocations in cgroup_free_controllers().
> > > > 
> > > > 
> > > > Thanks
> > > > Ken'ichi Ohmichi
> > > > 
> > > > Signed-off-by: Ken'ichi Ohmichi <[email protected]>
> > > > ---
> > > > diff -rpuN a/src/api.c b/src/api.c
> > > > --- a/src/api.c 2009-04-01 14:59:19.000000000 +0900
> > > > +++ b/src/api.c 2009-04-08 17:47:27.000000000 +0900
> > > > @@ -1715,6 +1715,7 @@ unlock_error:
> > > >          * XX: Need to figure out how to cleanup? Cleanup just the stuff
> > > >          * we added, or the whole structure.
> > > >          */
> > > > +       cgroup_free_controllers(cgroup);
> > > 
> > > This is wrong. We still leave a leak in. We need a 
> > > 
> > 
> > Just to clarify, right now there is no leak, but once I do those
> > changes, we will have unless we clean up then as well. So let us do it
> > right now. (and I would like those changes elsewhere as well, where we
> > do it with the idea to free the cgroup related leaks)
> >
> 
> Sorry for the late interruption, but that is bogus. I think the patch
> is good to go
> 

I don't agree. cgroup_free() is the method I prefer to use as opposed to
cgroup_free_controllers().

thanks,
-- 
regards,
Dhaval

------------------------------------------------------------------------------
The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled. http://p.sf.net/sfu/kodak-com
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to