Microsoft
Software
Hardware
Network
Question : Identify available memory for an x86 application in x64 Windows
I am writing an application that must run as x86 regardless of the host operating system.
My application loads a lot of pictures on screen, and depending on the size and number of pictures displayed, the memory demands can become quite high. To help avoid "Insufficient memory" errors, I added code that captures the amount of physical RAM available before I begin loading pictures, and I use that to know at what point my memory usage is reaching its limit.
This works fine in a 32-bit host but not in a 64-bit host.
If a machine has 8GB of RAM, a 32-bit application (seemingly) can still only use about 1.5GB of RAM, although I can't find any definite numbers to justify that - this is simply my observations from testing.
My program may think there is 6GB of memory available, but it errors out with "insufficient memory" far earilier.
Is there any way to isolate the amount of memory that CAN be allocated to a 32-bit application?
Currently I use the following to identify available memory on demand:
Dim computer_info As New Devices.ComputerInfo
Dim availableMemory As ULong = computer_info.AvailablePhy
sicalMemor
y
Answer : Identify available memory for an x86 application in x64 Windows
AvailableVirtualMemory this is your limit. It's roughly 2GB of the 4GB on 32 bit systems.
Random Solutions
datagrid question
Delphi 6 not recompiling .pas files
When I encrypt/encode a string using codeigniter encryption class, it is different everytime, why?
How Can I Turn Off the Record Selector Bar on an Inserted SubForm?
Icons and Start menu disappeared from desktop, running Windows 7 Home Edition on a Dell
Linq and new features design in VS 2008
SCCM Scan agent fails with Scan Failed for ToolUniqueID with error 0x80070005
GPO Assign Application reinstall
Windows XP Taskbar won't auto-hide
IAS Server not responding