Memory Allocation Limit for a 32-bit Application on a 64-Bit System

Is the maximum limit for malloc (virtual heap, I assume?) For a 32-bit application on a 64-bit system (for Windows 2003 SP2 x64) 2GB?

I am basically trying to get the program out of this without any luck. So I was wondering if this is true for ALL 32-bit applications on platforms with 64-bit Windows.

Thanks!

+4
source share
2 answers

You must link your application with / LARGEADDRESSAWARE to make the application larger than 2 GB. You can then use up to 4 GB on a 64-bit OS in a 32-bit application.

+7
source

32-bit applications have a virtual address space that allows addressing up to 4 GB in the 64-bit version of windows.

4GB configuration in a Win32 document and COM Development on MSDN, explains the / LARGEADDRESSAWARE linker. Enabling this device will allow 32-bit applications to address up to 4 GB of memory.

See "Memory Management" in the MSDN Library. Using the functions of the memory management service WIN32 provides functions not available in the C runtime library. Whether you need this functionality is up to you.

+1
source

Source: https://habr.com/ru/post/1300652/


All Articles