Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
New Contributor I
6 Views

error(41) insufficient virtual memory

I have 2.35 TB of virtual memory in a x64 application but I still get a error(41) insufficient virtual memory message. I ham using Win-10 x64 and debug build targetting x64 using msvs 2013 community edition and Intel's PS XE CE Fortran 2017 r2. So how do I tell my exe that it has a lot of memory? How do I give it a larger stack space, a larger fp stack space?

Thanks,

Brooks

0 Kudos
11 Replies
Highlighted
6 Views

Brooks,

Brooks,

You are likely confusing the term Virtual or Physical Address Space with Virtual Memory. The Virtual/Physical Address Space is a hardware limitation of the CPU. Whereas the Virtual Memory capacity of a process is an O/S limitation providing a sub-set of the CPU capability. This limitation is typically a limitation of the system Page File (Swap File) capacity and/or how the O/S is configured to partition the CPU's Virtual/Physical Address Space (portion for O/S, portion for application, portion for dynamically loaded libraries, portion for I/O, etc...).

Look at the page file size. On Windows 7 this is in System Properties, Advanced, Performance, Settings, Advanced, Virtual Memory, Change

Note, this will reserve sufficient disk space for the size you specify. To get what you stated, you will require a single volume with 2.35TB free space (less current page file size) to make that size available. (Subject to O/S limitations https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx#physical_memory_limi...

Jim Dempsey

 

0 Kudos
Highlighted
New Contributor I
6 Views

Attached is the memory status

Attached is the memory status during this run.

0 Kudos
Highlighted
Valued Contributor III
6 Views

Look into this:

0 Kudos
Highlighted
Black Belt
6 Views

The "memory status" you

The "memory status" you posted is inaccurate. You certainly don' have 2TB of available virtual memory - not with only 1TB and change of free disk space. That is showing you the theoretical maximum Windows currently supports. There really isn't a good way to know what the actual limit is, as there is no setting for this. You don't know until you run out.

You asked about FP stack size - on X64 there is no such thing, and even on IA-32 you're using SSE instructions and not the old x87 FP stuff (where the FP stack size is fixed.)

So how much VM did your program use before it failed? Intel Inspector XE has a "memory growth" display that can be helpful.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor I
6 Views

Steve, I don't have Intel

Steve, I don't have Intel Inspector XE. I have the Composer edition. I don't have money for something like Inspector.

Brooks

0 Kudos
Highlighted
Black Belt
6 Views

You can always get a 30-day

You can always get a 30-day free trial.

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor I
6 Views

Steve,

Steve,

I got it and ran it. I'm only using about 500GB and the only memory errors are coming from tv_x64.dll. It is not an easy tool to use and I had to manually change the global flags by hand in the hklm.

Brooks

0 Kudos
Highlighted
New Contributor I
6 Views

That is 500 MB not GB. Brooks

That is 500 MB not GB.

Brooks

0 Kudos
Highlighted
Black Belt
6 Views

I don;t know what tv_x64.dll

I don;t know what tv_x64.dll is. How much memory was trying to be allocated when it failed? Was this an explicit ALLOCATE in your code?

Steve (aka "Doctor Fortran") - https://stevelionel.com/drfortran
0 Kudos
Highlighted
New Contributor I
6 Views

It may take me a few days to

It may take me a few days to answer your questions.

Brooks

0 Kudos
Highlighted
New Contributor I
6 Views

All,

All,

 

This was my problem. I didn't destroy all the resources I created under Windows. And some I destyroyed too many times. I had to do a pairwise grouping process to make sure I destroyed everything I created.

 

Thanks all,

 

Brooks

0 Kudos