diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-09-11 13:41:15 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2007-09-11 13:41:15 +0100 |
commit | 337e2014c73b7fd7dba693222fcd91bb40d8a42b (patch) | |
tree | 4ae29c965e7dfcf62cb435854135694e5be82b46 /tools | |
parent | 4a6a1afb1cd360b0b1c482d86aa25fd284e22b28 (diff) | |
download | xen-337e2014c73b7fd7dba693222fcd91bb40d8a42b.tar.gz xen-337e2014c73b7fd7dba693222fcd91bb40d8a42b.tar.bz2 xen-337e2014c73b7fd7dba693222fcd91bb40d8a42b.zip |
Fix memory leak in xend
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>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/python/xen/xend/XendDomain.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/tools/python/xen/xend/XendDomain.py b/tools/python/xen/xend/XendDomain.py index 083fd2464d..6ceea45e08 100644 --- a/tools/python/xen/xend/XendDomain.py +++ b/tools/python/xen/xend/XendDomain.py @@ -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) |