From patchwork Tue Sep 27 09:48:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnaud Charlet X-Patchwork-Id: 116561 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id 56496B6F7E for ; Tue, 27 Sep 2011 19:48:49 +1000 (EST) Received: (qmail 6332 invoked by alias); 27 Sep 2011 09:48:46 -0000 Received: (qmail 6319 invoked by uid 22791); 27 Sep 2011 09:48:45 -0000 X-SWARE-Spam-Status: No, hits=-1.8 required=5.0 tests=AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 27 Sep 2011 09:48:30 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id F11782BB2D2; Tue, 27 Sep 2011 05:48:29 -0400 (EDT) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id KEA6MazYnseu; Tue, 27 Sep 2011 05:48:29 -0400 (EDT) Received: from kwai.gnat.com (kwai.gnat.com [205.232.38.4]) by rock.gnat.com (Postfix) with ESMTP id DE08F2BB2CD; Tue, 27 Sep 2011 05:48:29 -0400 (EDT) Received: by kwai.gnat.com (Postfix, from userid 4192) id CE06792BF6; Tue, 27 Sep 2011 05:48:29 -0400 (EDT) Date: Tue, 27 Sep 2011 05:48:29 -0400 From: Arnaud Charlet To: gcc-patches@gcc.gnu.org Cc: Tristan Gingold Subject: [Ada] Fix stack usage for windows-64 Message-ID: <20110927094829.GA6252@adacore.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.20 (2009-06-14) Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org According to some experiments, the guard area size is 16KB on Windows 64. (Stack size must be a multiple of the allocation granularity - 64KB - to get better guard size estimation). No OS independant testcase. Tested on x86_64-pc-linux-gnu, committed on trunk 2011-09-27 Tristan Gingold * s-tassta.adb (Task_Wrapper): Increase Guard_Page_Size value for windows 64. Index: s-tassta.adb =================================================================== --- s-tassta.adb (revision 179247) +++ s-tassta.adb (working copy) @@ -1164,7 +1164,7 @@ if System.Stack_Usage.Is_Enabled then declare - Guard_Page_Size : constant := 12 * 1024; + Guard_Page_Size : constant := 16 * 1024; -- Part of the stack used as a guard page. This is an OS dependent -- value, so we need to use the maximum. This value is only used -- when the stack address is known, that is currently Windows.