# HG changeset patch # User David Scott <[email protected]> # Date 1259361890 0 # Node ID 017686f2d3b2f906b094a07fbd32926ef6b832ad # Parent 099e85cfc1fee37b949f20ae56ff85125380a956 [XIU]: When destroying a domain in the simulator, give its memory back to xen.
Signed-off-by: David Scott <[email protected]> diff -r 099e85cfc1fe -r 017686f2d3b2 ocaml/xiu/xiu.ml --- a/ocaml/xiu/xiu.ml Fri Nov 27 22:44:49 2009 +0000 +++ b/ocaml/xiu/xiu.ml Fri Nov 27 22:44:50 2009 +0000 @@ -517,7 +517,9 @@ newdom let domain_destroy domid = - ignore (domain_find domid); Hashtbl.remove domains domid + let d = domain_find domid in + transfer_to_domain d (-d.tot_mem_kib); + Hashtbl.remove domains domid let domain_sethandle domid uuid = let dom = domain_find domid in dom.uuid <- uuid; () 1 file changed, 3 insertions(+), 1 deletion(-) ocaml/xiu/xiu.ml | 4 +++-
# HG changeset patch # User David Scott <[email protected]> # Date 1259361890 0 # Node ID 017686f2d3b2f906b094a07fbd32926ef6b832ad # Parent 099e85cfc1fee37b949f20ae56ff85125380a956 [XIU]: When destroying a domain in the simulator, give its memory back to xen. Signed-off-by: David Scott <[email protected]> diff -r 099e85cfc1fe -r 017686f2d3b2 ocaml/xiu/xiu.ml --- a/ocaml/xiu/xiu.ml Fri Nov 27 22:44:49 2009 +0000 +++ b/ocaml/xiu/xiu.ml Fri Nov 27 22:44:50 2009 +0000 @@ -517,7 +517,9 @@ newdom let domain_destroy domid = - ignore (domain_find domid); Hashtbl.remove domains domid + let d = domain_find domid in + transfer_to_domain d (-d.tot_mem_kib); + Hashtbl.remove domains domid let domain_sethandle domid uuid = let dom = domain_find domid in dom.uuid <- uuid; ()
_______________________________________________ xen-api mailing list [email protected] http://lists.xensource.com/mailman/listinfo/xen-api
