From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.5 required=5.0 tests=BAYES_00,INVALID_MSGID, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII X-Google-Thread: 103376,2cad261dc7af856 X-Google-Attributes: gid103376,public From: "Sune Falck" Subject: Re: Invalid page fault with gnat304a on Win95 Date: 1996/10/01 Message-ID: <01bbafc6$020b48e0$LocalHost@sfnp04h>#1/1 X-Deja-AN: 186576179 references: <19961001002056.aaaa000RR@babyblue.cs.yale.edu> organization: Tullinge newsgroups: comp.lang.ada Date: 1996-10-01T00:00:00+00:00 List-Id: Vinicius Fernando Arcaro skrev i inl�gg <19961001002056.aaaa000RR@babyblue.cs.yale.edu>... > Dear gnat user: > > This program runs correctly only with maxn less than 93, > otherwise it runs into a page fault. Is there a way to use a > maxn greater than 92? I am compiling and linking through > gnatmake test.adb > > procedure test is > > maxn : constant integer := 93; > a : array (1 .. maxn, 1 .. maxn) of long_float; > > begin > for i in 1 .. maxn loop > for j in 1 .. maxn loop > a(i,j) := 0.0; > end loop; > end loop; > end test; > Your program needs 93*93*8 = 69192 bytes, in hex 10E48 on the stack and the default value for the committed stack size in hex is 10000 Try to increase the stack size With microsoft tool editbin - C:\tmp>h:\dev\msdev\bin\editbin /stack:100000,100000 c:\tmp\test.exe Microsoft (R) COFF Binary File Editor Version 3.00.5270 Copyright (C) Microsoft Corp 1992-1995. All rights reserved. After this change your program runs just fine. One can give gnatmake options to the linker in the following way that also gives a working program. C:\tmp>gnatmake test -largs -Xlinker -stack -Xlinker 100000,20000 gnatbind -x test.ali gnatlink -Xlinker -stack -Xlinker 100000,20000 test.ali C:\tmp>test Runs fine with a committed stack size of 20000 The mysterious -Xlinker options is there to make gcc pass the argument "-stack 100000,20000" to the linker. -- Sune Falck mailto:Sune.Falck@abc.se Stavshaellsv 5, S-146 54 Tullinge, SWEDEN