From: Jim Fehlig <jfehlig@novell.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Fix 'memory leak' in xend
Date: Mon, 10 Sep 2007 14:52:33 -0600 [thread overview]
Message-ID: <46E5AE91.1090402@novell.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 456 bytes --]
I found that xend's memory usage grows considerably when running a
script such as
while true; do xm new foo ; sleep 2s; xm delete foo ; sleep 2s; done
XendAPIStore maintains a list of class instances and in the case of
new/create operation, an associated VMMetrics object is stashed in the
list but never removed on delete/shutdown. This patch removes the
instance by invoking XendBase.destroy() method.
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
[-- Attachment #2: xend_mem_leak.diff --]
[-- Type: text/x-patch, Size: 546 bytes --]
diff -r 9071521d4864 tools/python/xen/xend/XendDomain.py
--- a/tools/python/xen/xend/XendDomain.py Fri Sep 07 11:39:10 2007 +0100
+++ b/tools/python/xen/xend/XendDomain.py Mon Sep 10 11:35:59 2007 -0600
@@ -1088,6 +1088,7 @@ class XendDomain:
log.info("Domain %s (%s) deleted." %
(dominfo.getName(), dominfo.info.get('uuid')))
+ dominfo.metrics.destroy()
self._managed_domain_unregister(dominfo)
self._remove_domain(dominfo)
XendDevices.destroy_device_state(dominfo)
[-- Attachment #3: Type: text/plain, Size: 138 bytes --]
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
next reply other threads:[~2007-09-10 20:52 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-09-10 20:52 Jim Fehlig [this message]
-- strict thread matches above, loose matches on Subject: below --
2007-09-13 4:55 [PATCH] Fix memory leak in xend Kouya Shimura
2008-07-10 22:28 Jim Fehlig
2008-08-28 21:52 ` Stefan de Konink
2008-08-29 1:14 ` Zhigang Wang
2008-08-29 1:42 ` Stefan de Konink
2008-08-29 1:54 ` Zhigang Wang
2008-08-29 1:58 ` Stefan de Konink
2008-08-29 5:28 ` Jim Fehlig
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=46E5AE91.1090402@novell.com \
--to=jfehlig@novell.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.