- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello there,
i really need some help here. Im using a Fortran program that has to alocate a little more than 1GB of memory to run.
My PC has 8GB of RAM and my laptop too. Both are Core i5.
In the laptop the program works flawlessly. In the PC, IF I alocate more than 1GB of ram, I get the following error:
Allocating ARRAYS in solve0
Required space = 1130 Mbytes
forrtl: severe (41): insufficient virtual memory
Image PC Routine Line Source
SOLVER.exe 005395C0 Unknown Unknown Unknown
SOLVER.exe 004FC016 Unknown Unknown Unknown
SOLVER.exe 004E80A2 Unknown Unknown Unknown
SOLVER.exe 004DF522 Unknown Unknown Unknown
SOLVER.exe 0044A2C3 Unknown Unknown Unknown
SOLVER.exe 0046AF8E Unknown Unknown Unknown
SOLVER.exe 0053AC33 Unknown Unknown Unknown
SOLVER.exe 005212ED Unknown Unknown Unknown
kernel32.dll 765D338A Unknown Unknown Unknown
ntdll.dll 772A9F72 Unknown Unknown Unknown
ntdll.dll 772A9F45 Unknown Unknown Unknown
Is exactly the same .exe using the same input data.
How do I make the program to work in the PC? any help here?
in Attachment a picture of my task manager showing the amount of available memory
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
1 GB is a small paging size to fail on. You could run task manager to see if other processes are using all the paging space.
You did not mention the operating system, but on Win 7 to change paging size:
Go to Control Panel > System > Advanced System Settings > Advanced > Performance Options > Advanced > Virtual memory > Change...
You could either:
select "Automatically manage paging file size" , or
"Custom size"
and put in sensible values, say Initial 16384 MB, Maximum 32768 MB
I suspect the values selected are too small.
If this is not the case then there must be some other problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
>>SOLVER.exe 004DF522 Unknown Unknown Unknown
The 004DF522 indicates you are running a 32-bit application. Can you recompile and run as 64-bit (assuming your O/S is 64 bit capable)?
The maximum application size on 32-bit Windows is either 2GB or 3GB depending on a configuration switch in BOOT.INI. Default is 2GB.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi all,
thanks a lot for all the answers. So, both my systems in Desktop and Laptop are 64 bits (windows 7)
. Both have "Automatically manage paging file size" on
Anyway I tried incresing the page file to 16 GB minimum and 32 GB maximum an no luck too
And about the bits: You are right, the program is compiled for 32 bits. But the weird thing is that it works on my laptop (the same program, so, 32 bits). Before re-compiling for 64 bits, could you please give me another hint?
I attached in the first post a picture of task manager in the Desktop, but, in resume, I have 3890 mb of RAM in cache, 4080 of ram a available and 237 mb free.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The problem with 32-bit applications is the default behavior on Windows is the low half of the address space (half of 4GB, or 2GB) is available for application space, and the other half is available for system space.
The BOOT.INI (and other techniques in the link provided) changes the dividing point between application space and system space to provide the application with 3/4ths the address space (3GB for application, 1GB for system).
One possibility why it works on one system and not the other, is the working system may be set for 3GB application space, and the other for 2GB application space. These ratios are per process that runs in your system (process is generalized to be "application").
The amount of physical RAM or page file size cannot increase the 32-bit address space to be larger than 4GB total (2/2 or 3/1), though it could reduce it.
A second possibility is you just got lucky.
The particular error you got is (I believe) running out of heap space. What you might be able to do, is to reduce the amount of stack space. If you are building your application, then reduce the amount of stack (not, this too may break your program if too small). If your program is an .EXE built by someone else, then from a command prompt
dumpbin /headers YourFileNameHere.exe
Then use
editbin /STACK:newSizeHere YourFileNameHere.exe
to set the stack size (note, save the original size so you know where you came from).
Also, if your program is multi-threaded, you may be able to reduce the number of threads (assuming adjusting stack size did not work). Each thread requires stack space, the more threads you use, the less heap is available.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Jim,
just to align our thoughts: The application is 32 bit, but both systems are 64 bit. The BOOT.INI has an influence even on 64 bit windows?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
*** Before you set large address aware be aware that this can introduce errors in programs if addresses are being compared using signed integers. Only when all address comparisons are performed using unsigned integers (32 bit) will it be safe to enable this feature (for 32-bit applications).
You might need to use editbin to set the flag IMAGE_FILE_LARGE_ADDRESS_AWARE in the image header
editbin /LARGEADDRESSAWARE:YES YourProgramNameHere.exe
And/or
BCDedit /set increaseuserva 3072
See:
https://msdn.microsoft.com/en-us/library/bb613473.aspx
https://msdn.microsoft.com/en-us/library/ff542202.aspx
https://msdn.microsoft.com/en-us/library/windows/desktop/bb613473(v=vs.85).aspx
https://msdn.microsoft.com/en-us/library/aa384219(VS.85).aspx
https://msdn.microsoft.com/en-us/library/ms680349(v=vs.85).aspx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Your program is asking for more than 1GB of contiguous memory. It may be that on the desktop enough other software loads into your address space that there isn't that big a single chunk of virtual address space available. RAM has little to do with it. Since both your systems are 64-bit I would recommend rebuilding as a 64-bit application.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page