Quantcast
Channel: Intel® Fortran Compiler
Viewing all articles
Browse latest Browse all 3270

Stack reserve size in DLL vs EXE

$
0
0

I've converting a Fortran 77 code that has lots of stack memory utilization from an executable to a DLL (Windows).  For example there are hundreds (thousands) of arrays such as this:

      COMMON/A1/  CU1(LCM,KCM),     CU2(LCM,KCM),
     2            UUU(LCM,KCM),     VVV(LCM,KCM),  WWW(LCM,0:KCM),
     3             DU(LCM,KCM),      DV(LCM,KCM),
     4             FX(LCM,KCM),      FY(LCM,KCM)

After modifying the stack reserve size to be as large as possible the program compiles and runs as a standalone executable.  When it's compiled as a DLL it crashes with:

Unable to load DLL 'LIB.dll': Not enough storage is available to process this command. (Exception from HRESULT: 0x80070008)

What is the difference in a DLL and EXE that is causing this?


Viewing all articles
Browse latest Browse all 3270

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>