From: Stefano Stabellini Subject: Re: [PATCH v2 2/2] xen/arm: support gzip compressed kernels Date: Wed, 2 Sep 2015 12:26:50 +0100 Message-ID: References: <1439464897-32609-2-git-send-email-stefano.stabellini@eu.citrix.com> <55CC80F6.3030307@citrix.com> <1441120027.26292.51.camel@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1441120027.26292.51.camel@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: Julien Grall , xen-devel@lists.xensource.com, Stefano Stabellini List-Id: xen-devel@lists.xenproject.org On Tue, 1 Sep 2015, Ian Campbell wrote: > On Tue, 2015-09-01 at 15:57 +0100, Stefano Stabellini wrote: > > > > > I'm not sure to see how this would work. Any call to > > > alloc_xenheap_pages > > > should be follow by a called to free_xenheap_pages. > > > But when freeing the modules, we are using init_heap_pages. > > > I don't think they are similar. > > > > Actually init_heap_pages is just a wrapper around free_heap_pages, like > > free_xenheap_pages. I think it is safe to call init_heap_pages, on > > memory allocated by alloc_xenheap_pages. > > That probably depends on lots of things, in particular the setting of > CONFIG_SEPARATE_XENHEAP and in any case I think it should be avoided as a > matter of principal. > > Also, modules are freed to the domheap not the xenheap. > > Maybe it would be best if this memory was allocated from there? Yes, you are right, it would definitely be better.