From: jcreem@mv.mv.com (Jeff Creem)
Subject: Re: Invalid page fault with gnat304a on Win95
Date: 1996/10/04
Date: 1996-10-04T00:00:00+00:00 [thread overview]
Message-ID: <jcreem-0410961142090001@ljd155.sanders.lockheed.com> (raw)
In-Reply-To: 01bbafc6$020b48e0$LocalHost@sfnp04h
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 2096 bytes --]
In article <01bbafc6$020b48e0$LocalHost@sfnp04h>, "Sune Falck"
<Sune.Falck@abc.se> wrote:
> Vinicius Fernando Arcaro <vfa@turing.unicamp.br> 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
I think the above will work but for something not quit that ugly you
could have the test code run out of the context of a task. Define the
task as a task type and set the 'Storage_Size of the task type to the
appropriate value.
I did not try this on you program but on every other implementation I've
seen this approach works just fine.
Jeff Creem
next prev parent reply other threads:[~1996-10-04 0:00 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-10-01 0:00 Invalid page fault with gnat304a on Win95 Vinicius Fernando Arcaro
1996-10-01 0:00 ` Sune Falck
1996-10-04 0:00 ` Jeff Creem [this message]
1996-10-04 0:00 ` Robert A Duff
1996-10-02 0:00 ` Nikolay P. Vasilyev
-- strict thread matches above, loose matches on Subject: below --
1996-10-01 0:00 Vinicius Fernando Arcaro
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox