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)

Thanks,
-- 
regards,
Dhaval

------------------------------------------------------------------------------
This SF.net email is sponsored by:
High Quality Requirements in a Collaborative Environment.
Download a free trial of Rational Requirements Composer Now!
http://p.sf.net/sfu/www-ibm-com
_______________________________________________
Libcg-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to