ia64/xen-unstable
changeset 15875:4cd10e49c3f8
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>
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>
author | kfraser@localhost.localdomain |
---|---|
date | Tue Sep 11 13:41:15 2007 +0100 (2007-09-11) |
parents | d146097e049d |
children | 0ec41d91799f |
files | tools/python/xen/xend/XendDomain.py |
line diff
1.1 --- a/tools/python/xen/xend/XendDomain.py Tue Sep 11 13:40:44 2007 +0100 1.2 +++ b/tools/python/xen/xend/XendDomain.py Tue Sep 11 13:41:15 2007 +0100 1.3 @@ -1088,6 +1088,7 @@ class XendDomain: 1.4 log.info("Domain %s (%s) deleted." % 1.5 (dominfo.getName(), dominfo.info.get('uuid'))) 1.6 1.7 + dominfo.metrics.destroy() 1.8 self._managed_domain_unregister(dominfo) 1.9 self._remove_domain(dominfo) 1.10 XendDevices.destroy_device_state(dominfo)