From patchwork Wed Jul 18 16:37:43 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Weil X-Patchwork-Id: 171743 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by ozlabs.org (Postfix) with ESMTPS id E5A3D2C0091 for ; Thu, 19 Jul 2012 02:37:57 +1000 (EST) Received: from localhost ([::1]:59703 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrXG8-0006SZ-03 for incoming@patchwork.ozlabs.org; Wed, 18 Jul 2012 12:37:56 -0400 Received: from eggs.gnu.org ([208.118.235.92]:38921) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrXG0-0006SE-6o for qemu-devel@nongnu.org; Wed, 18 Jul 2012 12:37:49 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SrXFx-0002de-QZ for qemu-devel@nongnu.org; Wed, 18 Jul 2012 12:37:48 -0400 Received: from v220110690675601.yourvserver.net ([78.47.199.172]:49586) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SrXFx-0002dV-JV for qemu-devel@nongnu.org; Wed, 18 Jul 2012 12:37:45 -0400 Received: from localhost (v220110690675601.yourvserver.net.local [127.0.0.1]) by v220110690675601.yourvserver.net (Postfix) with ESMTP id 0D555728001A; Wed, 18 Jul 2012 18:37:45 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at weilnetz.de Received: from v220110690675601.yourvserver.net ([127.0.0.1]) by localhost (v220110690675601.yourvserver.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id s4S-YXDzVgwU; Wed, 18 Jul 2012 18:37:44 +0200 (CEST) Received: by v220110690675601.yourvserver.net (Postfix, from userid 1000) id 9067272800C9; Wed, 18 Jul 2012 18:37:44 +0200 (CEST) From: Stefan Weil To: Alexey Kardashevskiy Date: Wed, 18 Jul 2012 18:37:43 +0200 Message-Id: <1342629463-3378-1-git-send-email-sw@weilnetz.de> X-Mailer: git-send-email 1.7.10 X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 78.47.199.172 Cc: Stefan Weil , qemu-devel@nongnu.org Subject: [Qemu-devel] [PATCH] configure: Support system emulation with large memory on w32 hosts X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org Sender: qemu-devel-bounces+incoming=patchwork.ozlabs.org@nongnu.org 32-bit applications on Windows normally only get virtual memory in the lower 2 GiB address space. Because of memory fragmentation, VirtualAlloc() usually won't get 1 GiB of contiguous virtual memory in that address space. Therefore running system emulations with 1 GiB or more RAM will abort with a failure. The linker flag --large-address-aware allows addresses in the upper 2 GiB. With this flag, it is possible to run emulated machines with up to 2047 MiB RAM. Signed-off-by: Stefan Weil --- I tested the executables with large address awareness on a 64 bit Windows (works) and with Wine on Debian 32 bit Linux (no longer aborts, but hangs when 1024 or more MiB are requested). Maybe the support for large addresses is broken in my Wine version. Please report any different test results. Regards, Stefan Weil configure | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index df5c99a..b681f9a 100755 --- a/configure +++ b/configure @@ -2937,9 +2937,9 @@ else POD2MAN="pod2man" fi -# Use ASLR, no-SEH and DEP if available +# Use ASLR, large addresses, no-SEH and DEP if available if test "$mingw32" = "yes" ; then - for flag in --dynamicbase --no-seh --nxcompat; do + for flag in --dynamicbase --large-address-aware --no-seh --nxcompat; do if $ld --help 2>/dev/null | grep ".$flag" >/dev/null 2>/dev/null ; then LDFLAGS="-Wl,$flag $LDFLAGS" fi