From: jim hopper <hopperj@macconnect.com>
Subject: Re: STORAGE_ERROR : EXCEPTION_STACK_OVERFLOW
Date: Tue, 12 Jul 2005 00:29:21 GMT
Date: 2005-07-12T00:29:21+00:00 [thread overview]
Message-ID: <110720052028337797%hopperj@macconnect.com> (raw)
In-Reply-To: nospam-BBEA5F.23520608072005@news-server.woh.rr.com
This probably means you have an Array in your program thats grown to
large to be stored as a stack based variable. the right thing to do is
to change this so that the variable is a pointer to an array then set
the point to "new <ARRAY>". this is pretty much transparent to the
rest of your code and it will force the array onto the heap and out of
the stack which allows you a MUCH larger data structure.
jim
In article <nospam-BBEA5F.23520608072005@news-server.woh.rr.com>, John
B. Matthews <nospam@nospam.com> wrote:
> > I am creating software in Ada to visualize images obtained with a
> > fluorescence microscope. Unfortunately, when I switch my images from having
> > 16 bit pixels to 32 bit pixels, I raise the exception STORAGE_ERROR :
> > EXCEPTION_STACK_OVERFLOW.
> > I am using GNAT 3.15p.
> > The Users Guide to Windows states: "5.3 Setting Stack Size from gnatlink
> > It is possible to specify the program stack size from gnatlink. Assuming
> > that the underlying linker is GNU ld there is two ways to do so:
> > using -Xlinker linker option
> > $ gnatlink hello -Xlinker --stack=0x10000,0x1000
> > This set the stack reserve size to 0x10000 bytes and the stack commit
> > size to 0x1000 bytes.
> > using -Wl linker option
> > $ gnatlink hello -Wl,--stack=0x1000000
> > This set the stack reserve size to 0x1000000 bytes. Note that with -Wl
> > option it is not possible to set the stack commit size because the coma is a
> > separator for this option."
> > My project file includes:
> >
> > package Linker is
> > for Default_Switches ("ada") use ("-g", "-Xlinker
> > stack=0x10000000,0x10000000");
> > end Linker;
> >
> > Even with a 10 megabyte stack, I still get Stack_Overflow.
> > Any suggestions would be greatly appreciated. I believe that I know how
> > to put the array on the heap using an access type. However, I greatly
> > prefer working with objects that are on the stack and omitting pointers from
> > my code.
> > Thank you.
> > Bob Leif
next prev parent reply other threads:[~2005-07-12 0:29 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-07-08 21:48 STORAGE_ERROR : EXCEPTION_STACK_OVERFLOW Robert C. Leif
2005-07-09 3:52 ` John B. Matthews
2005-07-12 0:29 ` jim hopper [this message]
2005-07-09 22:55 ` Björn Persson
2005-07-11 10:15 ` Alex R. Mosteo
2005-07-11 20:07 ` Keith Thompson
[not found] <200507082148.j68LmXhG002695@mail733.megamailservers.com>
2005-07-09 9:27 ` Marius Amado Alves
2005-07-09 19:14 ` Duncan Sands
[not found] <20050709100024.322314C41FD@lovelace.ada-france.org>
2005-07-09 12:29 ` Robert C. Leif
-- strict thread matches above, loose matches on Subject: below --
2005-08-05 0:55 Adaddict
2005-08-05 1:21 ` Adaddict
2007-04-02 6:13 andrew.carroll
2007-04-02 10:10 ` Stephen Leake
2007-04-02 14:11 ` andrew.carroll
2007-04-02 18:43 ` andrew.carroll
2007-04-02 21:48 ` Georg Bauhaus
2007-04-02 21:40 ` andrew.carroll
2007-04-03 10:25 ` Georg Bauhaus
2007-04-03 17:07 ` andrew.carroll
2007-04-03 19:43 ` Simon Wright
2007-04-03 21:32 ` andrew.carroll
2007-04-04 0:49 ` Georg Bauhaus
2007-04-04 0:32 ` andrew.carroll
2007-04-05 18:28 ` Georg Bauhaus
2007-04-09 13:12 ` andrew.carroll
2007-04-09 18:19 ` Georg Bauhaus
2007-04-10 13:22 ` andrew.carroll
2007-04-10 15:07 ` Ludovic Brenta
2007-04-10 20:55 ` andrew.carroll
2007-04-10 22:17 ` Georg Bauhaus
2007-04-10 21:43 ` andrew.carroll
2007-04-12 8:32 ` Ludovic Brenta
2007-04-11 1:55 ` Jeffrey R. Carter
2007-04-11 2:34 ` andrew.carroll
2007-04-05 0:56 ` andrew.carroll
2007-04-02 20:45 ` Simon Wright
2007-04-02 21:47 ` andrew.carroll
2007-04-02 22:05 ` andrew.carroll
2007-04-03 0:09 ` Randy Brukardt
2007-04-11 2:49 ` andrew.carroll
2007-04-11 8:07 ` Georg Bauhaus
2007-04-11 21:31 ` Simon Wright
2007-04-12 16:00 ` andrew.carroll
2007-04-12 19:08 ` Simon Wright
2007-04-12 13:48 ` andrew.carroll
2007-04-12 15:49 ` Georg Bauhaus
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox