Stack and data size exceeds 64K 
Author Message
 Stack and data size exceeds 64K

When I use MS fortran 5.1 to compile the source code with two huge math
libs (2*6M),
then linker reports following error:

    Stack and data size exceeds 64K,

How can I deal with this problem? any suggestions are more than welcome



Wed, 18 Jun 1902 08:00:00 GMT  
 Stack and data size exceeds 64K

Quote:

>When I use MS fortran 5.1 to compile the source code with two huge math
>libs (2*6M),
>then linker reports following error:

>    Stack and data size exceeds 64K,

>How can I deal with this problem? any suggestions are more than welcome

Wow. You still use this thing.
As I remember (but I might be wrong) you need to use large memory model
while linking.
But if the error was caused by stack overflow, than you probably need
to change the compiler. As I remember (again it could be wrong) you
can't change stack size for the MS Fortan 5.1

Arkady



Wed, 18 Jun 1902 08:00:00 GMT  
 Stack and data size exceeds 64K
All of the leading Windows-based Fortran compilers will help you get beyond
this archaic restriction.  Around the beginning of this decade your question
was quite common, as MS took a long time to do a 32-bit Fortran product.
Lahey, Salford, and Watcom were the 32-bit answers back then.  Those are all
still reasonable answers.  MS has since left the market and Digital (Compaq)
and Absoft have entered.  If you need to stick with DOS, check out our LF90
compiler, which uses the Phar Lap extender on DOS (LF90 supports Windows
too).  See www.lahey.com.  If a console Windows application will do, then
you have lots of choices (see www.polyhedron.com for an independent look at
the various Windows-based Fortran compilers). If your code has MS-specific
barbarisms (ahem, extensions) then Digital Visual Fortran might be your best
choice, but consider ridding yourself of the MS extensions.  For the
ultimate in clean Fortran, try our free Essential LF90 product (a modern
Fortran subset, www.lahey.com/elfpage.htm) or Imagine1's F (under $100 on
Windows).

--
Bob Runyan
Lahey Computer Systems

Quote:


>>When I use MS fortran 5.1 to compile the source code with two huge math
>>libs (2*6M),
>>then linker reports following error:

>>    Stack and data size exceeds 64K,

>>How can I deal with this problem? any suggestions are more than welcome

>Wow. You still use this thing.
>As I remember (but I might be wrong) you need to use large memory model
>while linking.
>But if the error was caused by stack overflow, than you probably need
>to change the compiler. As I remember (again it could be wrong) you
>can't change stack size for the MS Fortan 5.1

>Arkady



Wed, 18 Jun 1902 08:00:00 GMT  
 Stack and data size exceeds 64K

Quote:

>When I use MS fortran 5.1 to compile the source code with two huge math
>libs (2*6M),
>then linker reports following error:

>    Stack and data size exceeds 64K,

>How can I deal with this problem? any suggestions are more than welcome

Try including the /Gt switch when you compile.  That will reduce how
much data goes into the default data segment.

You can use the linker's /STACK switch to adjust the size of the
stack.

Ken Plotkin



Wed, 18 Jun 1902 08:00:00 GMT  
 Stack and data size exceeds 64K


[snip]

Quote:
>and Absoft have entered.  If you need to stick with DOS, check out our LF90
>compiler, which uses the Phar Lap extender on DOS (LF90 supports Windows
>too).  See www.lahey.com.  If a console Windows application will do, then

[snip]

Nice to see a nice, unbiased "Buy my product" answer, when what the
guy really needs is a pointer to the /Gt and /STACK switches.

Ken Plotkin



Wed, 18 Jun 1902 08:00:00 GMT  
 Stack and data size exceeds 64K
Ken's given you the pointers you need, but if you still have problems
ask again.  Also, if you are straining the memory limits of real-mode DOS
(fairly easy to do) you can also resort to OVERLAYs.  Or
build the program as a QuickWin program  -- that requires one
change from the Fortran's examples to work under Win95 and later.

---------------
As for the rest of you, let me note that I have
DVF 5 and 6
Watcom 10.6 and 11.0
Absoft ProFortran 5
and two versions of G77 on my system
and still do as much MS F5.1 compiling as I do 32 bit stuff.

MS F5.1 doesn't generate 32 bit code, BUT it also doesn't take
a day and a half to load some IDE.  I can compile and link with MS F5.1
before DevStudio gets past it's splash screen.  It doesn't make a half
megabyte EXE to do "Hello World".  And the resulting EXE will run on
DOS 3.3 or later, and anything that will emulate that -- including OS/2
DOS boxes and DOSEMU on Unices (or however you pluralize that)
and under SoftPC on the Mac.  And no {*filter*}y cross-development
hassles!

And for little things, the 16 bit-ness isn't really a limitation.  And you
may
be surprised just how big a "little" thing can be.

So, let's stop the gratuitous running-down of obsolete but STILL VERY
USEFUL tools, please!  That doesn't serve anyone.
--
Kevin G. Rhoads, Ph.D. (Linearity is a convenient fiction.)




Wed, 18 Jun 1902 08:00:00 GMT  
 Stack and data size exceeds 64K


Quote:
>Subject: Re: Stack and data size exceeds 64K
>From: "Kevin G. Rhoads"
>Organization: IBM Global Services - Remote Access Mail & News Services
>Date: 6 Mar 1999 15:41:29 GMT
>Newsgroups: comp.lang.fortran

>Ken's given you the pointers you need, but if you still have problems
>ask again.  Also, if you are straining the memory limits of real-mode DOS
>(fairly easy to do) you can also resort to OVERLAYs.  Or
>build the program as a QuickWin program  -- that requires one
>change from the Fortran's examples to work under Win95 and later.

>---------------
>As for the rest of you, let me note that I have
>DVF 5 and 6
>Watcom 10.6 and 11.0
>Absoft ProFortran 5
>and two versions of G77 on my system
>and still do as much MS F5.1 compiling as I do 32 bit stuff.

Piker! No Lahey or Salford. Salford /undef is great. Like the old WatFor.

- Show quoted text -

Quote:

>MS F5.1 doesn't generate 32 bit code, BUT it also doesn't take
>a day and a half to load some IDE.  I can compile and link with MS F5.1
>before DevStudio gets past it's splash screen.  It doesn't make a half
>megabyte EXE to do "Hello World".  And the resulting EXE will run on
>DOS 3.3 or later, and anything that will emulate that -- including OS/2
>DOS boxes and DOSEMU on Unices (or however you pluralize that)
>and under SoftPC on the Mac.  And no {*filter*}y cross-development
>hassles!

>And for little things, the 16 bit-ness isn't really a limitation.  And you
>may
>be surprised just how big a "little" thing can be.

>So, let's stop the gratuitous running-down of obsolete but STILL VERY
>USEFUL tools, please!  That doesn't serve anyone.

And you can achieve the same advantages but avoid some of MSF5.1's follies
by using WFL (the 16 bit Watcom) instead of WFL386 (the 32 bit Watcom).
WFL is itself a 32 bit program but it compiles very quickly from the
command line. Some 16 bit codes run faster than their 32 bit analogues
because of the foilbles of the x86 design. :-(

- Show quoted text -

Quote:
>--
>Kevin G. Rhoads, Ph.D. (Linearity is a convenient fiction.)





Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. stack plus data exceeds 64k error

2. Segment Size Exceeds 64K

3. MS FORTRAN 5.1 seg. size exceeds 64K

4. Automatic data segment plus heap exceed 64K

5. stack size limit exceed :-(

6. stack size exceeded maxssiz

7. Constant size exceeds variable size?

8. Group or Segclass exceeds 64K

9. Link Error: Group or Segclass exceeds 64K

10. Group or Segclass exceeds 64K

11. SegClass exceeds 64K?

12. Segdef exceeds 64K

 

 
Powered by phpBB® Forum Software