Jump to content
Sign in to follow this  
knukles

Manual solution of OOM

Recommended Posts

VAS is just a fancy name for flat memory addressing. It doesn't change the 2^32 address space limit of 32-bit processes.

 

Best regards,

Robin.

Share this post


Link to post

Flat memory addressing  has nothing to do it's a 32 or 64 bit process - both are flat memory addressing.

 

 It's the Virtual Address Space (VAS)  that determines whether it's 32 or 64 bit .

Share this post


Link to post

"On 64-bit Microsoft Windows, processes running 32-bit executables that were linked with the /LARGEADDRESSAWARE:YES option have access to 4 GiB of virtual address space; without that option they are limited to 2GB. By default, 64-bit processes have 8TB of user-mode virtual address space; (...)"

 

from: http://en.wikipedia.org/wiki/Virtual_address_space

Share this post


Link to post

User-mode virtual address space for each 32-bit process is

  • Limit in on X86 determines if it's 2GB or up to 3GB with IMAGE_FILE_LARGE_ADDRESS_AWARE (set) and 4GT
  • Limit in 64-bit Windows and determines if it's 2 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE cleared (default) or 4 GB with  set

So with 64 bit you can't set 3GB user-mode virtual address space.

 

Also, you can't set 8TB user-mode virtual address space with an 32 bit.

Edited by mgh

Share this post


Link to post

You've still got it backwards. The number of bits determines the maximum addressable space. Not the other way around.

 

A 32 bit application running on a 64 bit OS is of course still limited to 32 bit addressing.

 

 

Sent from my iPhone using Tapatalk

Edited by kevinh

ki9cAAb.jpg

Share this post


Link to post

VAS size is determined by the the supported word length of the operating system.

 

a. A 32-bit process in a 32-bit Windows environment will be allocated a maximum of 2 GB of VAS, the rest being used by Windows. This can be increased to a maximum of 3 GB with the LAA flag. Not more.

 

b. A 32 bit-process in a 64-bit Windows environment will be allocated a maximum of 4 GB of VAS, minus the memory footprint of the operating system, unless there are more than 4 GB of physical memory installed.

 

c. Now a 64-bit process in a 64 bit Windows environment will be allocated up to 8 TB of VAS.

 

FSX falls into category b. and there is no way around this 4 GB limit.

Edited by MorsAbAlto

Share this post


Link to post

That is what already posted but for completion for user-mode virtual address space for each 64-bit process

  • Limit on 64-windows determines if it's x64 8TB (Intel Itanium-based systems 7TB, or Windows 8.1 and Windows Server 2012 R2 128TB) with IMAGE_FILE_LARGE_ADDRESS_AWARE set (default), or 2 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE cleared

 

64 bit may still have only 2GB

Share this post


Link to post

Lots of really interesting stuff here everyone. Mgh, thanks for the summary. I think your posts should be highlighted as best answers here, so that people stopping by finally understand. No 32-bit application is ever going to see more than 4 GiB of VAS, regardless of it running on 64, 128, or even a 256-bit OS... Period.

 

 

 

 

Andrew Entwistle

Share this post


Link to post

 

 


They are strictly speaking correct but if you expect to get 1 TB (in the computing sense of 10244 bytes) you will feel cheated. You'll get around 1012 bytes, about 9% less. Windows keeps up the confusion by not following the same naming standard. For example my laptop HDD is 750 GB according to the manufacturer. Windows "My Computer" reports that as 698 GB (750,145,503,232 bytes). It's not surprising people feel cheated.

 

Just be glad they don't use bit notation, as internet connection companies (almost) always do.

 

Fun game: try and find a C/S rep that does not understand the bit/byte difference and get them totally confused. Depending on your provider, this might be either next to impossible, or impossibly easy.

Share this post


Link to post

Maybe someday we will have a 128 bit simulator (may as well skip 64 bit now since its getting kind of old). Its more likely that our sun will go nova first :-)

 

Paul Racines

Share this post


Link to post

 

 


there is no way around this 4 GB limit.

 

This sounds absolutely locked in stone as you explain it, but...because I don't really understand the WHY part of this, it seems intuitive that a hack could be created to fool the OS into giving more VAS to an application.   I'm sure by now this would have been done, presumably.  So why is a hack not possible? 


Noel

System:  9900K@5.0gHz@1.23v all cores, MSI MPG Z390M GAMING EDGE AC, Noctua NH-D15S w/ steady supply of 40-60F ambient air intake, Corsair Vengeance 32Gb LPX 3200mHz DDR4, Sabrent NVMe 2Tb x 2, RTX 4090 FE, Corsair RM 850W PSU, Win10 Pro, LG Ultra Curved Gsync Ultimate 3440x1440, TCA Boeing Edition Yoke & TQ, Cessna Trim Wheel, RTSS Framerate Limiter w/ Edge Sync for near zero Frametime Variance achieving ultra-fluid animation at lower frame rates.

Aircraft used in A Pilot's Life V2:  PMDG 738, Aerosoft CRJ700, FBW A320NX, WT 787X

 

Share this post


Link to post

 

 


So why is a hack not possible?

 

I tried to work through this one a while back.  Unfortunately, a program will have pointers 32 bits long, no more, and there's no way to map more than 32 bits into this pointer.  For example, if you try to use one bit to specify which of two 32 bit address spaces you want to use, that leaves you with two 31 bit address spaces, the same total amount.  For various reasons, you have to be able to address every byte in an address space.

 

Sorry 'bout that.

 

Hook


Larry Hookins

 

Oh! I have slipped the surly bonds of Earth
And danced the skies on laughter-silvered wings;

Share this post


Link to post

There are ways around the 4 GB limit for 32 bit apps running under Win x64. They have been used in commercial software, but they also have drawbacks that make the approach viable only as short term solutions. I've mentioned this before as an example, but before Adobe went 64 bit with its entire suite of apps (Photoshop, Illustrator, Premiere Pro, etc.), its video special effects app,  After Effects CS4 would spawn multiple specialized copies of itself to do tasks in parallel and the main instance of the app would keep track of all the instances. For example, one instance would do all the work for one frame and then a second instance would do all the work for the next frame. Each instance and the main instance would each get 4 GB of VAS.

 

Of course, this approach was abandoned as Adobe went full 64 bit. I should add here for those who use Google Chrome as their browser, it still utilizes this approach, although the reason is not to stay under 4 GB of VAS. And if you think about it further, since most of the weather add-ons for FSX and P3d are self contained apps, they also get their own 4 GB of VAS. TrackIR is also a separate app. The approach is possible, but it isn't the best course of action. The best course of action is to offload as much computational load to the GPU.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...