From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46032 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PNfQB-0007hb-AB for qemu-devel@nongnu.org; Wed, 01 Dec 2010 00:40:23 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PNKWb-0008JB-7h for qemu-devel@nongnu.org; Tue, 30 Nov 2010 02:21:18 -0500 Received: from mail-bw0-f45.google.com ([209.85.214.45]:50008) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1PNKWb-0008GP-1R for qemu-devel@nongnu.org; Tue, 30 Nov 2010 02:21:17 -0500 Received: by bwz16 with SMTP id 16so4808856bwz.4 for ; Mon, 29 Nov 2010 23:21:15 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4CF4A5EB.2070106@redhat.com> Date: Tue, 30 Nov 2010 08:21:15 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <24346c6699fced39ed3725938091984ed23f48e5.1290552026.git.quintela@redhat.com> <4CF45C0C.705@codemonkey.ws> In-Reply-To: <4CF45C0C.705@codemonkey.ws> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: [Qemu-devel] Re: [PATCH 07/10] ram_save_remaining() returns an uint64_t List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Anthony Liguori Cc: Juan Quintela , qemu-devel@nongnu.org, Juan Quintela On 11/30/2010 03:06 AM, Anthony Liguori wrote: >> >> -static ram_addr_t ram_save_remaining(void) >> +static uint64_t ram_save_remaining(void) >> { >> RAMBlock *block; >> - ram_addr_t count = 0; >> + uint64_t count = 0; >> >> QLIST_FOREACH(block,&ram_list.blocks, next) { >> ram_addr_t addr; > > No, it returns a count of bytes of ram which is a subset of ram_addr_t's > space. The unit is definitely right here. It returns a count of pages, actually, which is a different unit. For example, in practice it can fit in 32 bits even (though I'm not saying we should make it uint32_t; we'd be dangerously close to the limit for the guest sizes that Juan is handling). Paolo