This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


Re: [Xen-devel] How to deallocate memory shared between domain and xen

To: "Santos, Jose Renato G" <joserenato.santos@xxxxxx>
Subject: Re: [Xen-devel] How to deallocate memory shared between domain and xen
From: Keir Fraser <Keir.Fraser@xxxxxxxxxxxx>
Date: Thu, 11 Aug 2005 09:58:33 +0100
Cc: Jose Renato Santos <jsantos@xxxxxxxxxx>, "Turner, Yoshio" <yoshio_turner@xxxxxx>, xen-devel@xxxxxxxxxxxxxxxxxxx, G John Janakiraman <john@xxxxxxxxxxxxxxxxxxx>, Ian Pratt <m+Ian.Pratt@xxxxxxxxxxxx>
Delivery-date: Thu, 11 Aug 2005 08:52:23 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <6C21311CEE34E049B74CC0EF339464B924B44D@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <6C21311CEE34E049B74CC0EF339464B924B44D@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx

On 11 Aug 2005, at 04:41, Santos, Jose Renato G wrote:

 OK. For now I will not explictly de-allocate the shared memory,
  and let the memory be deallocated when the domain dies.
  I am assuming nothing special has to be done and the memory gets
  deallocated automaticaly when the domain dies
  (SHARE_PFN_WITH_DOMAIN() seems to be including the shared
  page in the list of pages owned by the domain which
  should be automatically de-alocated when the domain dies, right?).
  Will this also cause the memory to be returned to the Xen heap?

No, you need to deallocate yourself. Add a hook function off domain_destruct(), and do any necessary deallocation there. The refcnts are to make sure the domain isn;t killed while other domains may have references to its xen-heap pages.

 -- Keir

Xen-devel mailing list

<Prev in Thread] Current Thread [Next in Thread>