Received: from eggs.gnu.org ([2001:4830:134:3::10]:34319) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yzk43-0007gX-No for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:09:00 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yzk3z-0001NK-GK for qemu-devel@nongnu.org; Tue, 02 Jun 2015 07:08:59 -0400 From: Alberto Garcia In-Reply-To: <20150602105610.GJ3765@noname.str.redhat.com> References: <3587410bf941dc495ec4e41201d1d53a21f7e6fb.1432891306.git.berto@igalia.com> <20150602100559.GI3765@noname.str.redhat.com> <20150602105610.GJ3765@noname.str.redhat.com> Date: Tue, 02 Jun 2015 13:08:52 +0200 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [Qemu-devel] [PATCH 1/3] qcow2: mark the memory as no longer needed after qcow2_cache_empty() List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-block@nongnu.org, qemu-devel@nongnu.org, Stefan Hajnoczi , Max Reitz On Tue 02 Jun 2015 12:56:10 PM CEST, Kevin Wolf wrote: >> > It seems that getpagesize() is usually used in qemu. >> >> The getpagesize() manual page actually recommends using sysconf() for >> portability reasons. But other than that I don't have a problem with >> getpagesize() if it's the preferred choice in QEMU. > > There is a Windows implementation for getpagesize() in qemu, so I > guess it's actually more portable in our context. Ok, I'll change that. > Now, as you'll #ifdef this code out for Windows, that probably doesn't > matter, so it's just about consistency. There's actually no need to #ifdef that code out, I only do it because I know in advance that it's going to be a no-op, but qemu_madvise() itself doesn't break or anything if the operation is not supported. Berto