How to increase ram limit for x86 applications developed in Vb.Net RRS feed

  • Question

  • I have a 32-bit  application developed in, I have a problem which is showing an Out Of Memory error when the process Memory reaches 1.2 GB but I understand that for this type of application the limit is 2GB for Objects , but it is falling well below the limit, I know that other system processes may be consuming the memory availability but I would like to know what it could be or where to find documentation that supports this.

    Any idea how to increase the limit that has from 1.2GB to 2GB?
    Friday, February 24, 2023 3:08 PM

All replies

  • 2GB or more
    Saturday, February 25, 2023 11:43 AM
  • A 32-bit application can use a maximum amount of 2GB of RAM. 

    As for your situation, could it be that your application has already taken up 1.2GB of memory, still attempts to allocate more memory, resulting in a total memory usage of more than 2GB, and then throws an Out Of Memory exception?
    Monday, February 27, 2023 7:42 AM
  • I cannot post links yet but I second the other system processes issue. 

    But if you still want to increase the memory limit for your application on a 32-bit system, you can try enabling the /LARGEADDRESSAWARE flag when compiling your application. This flag tells the operating system that the application can handle addresses larger than 2GB. Keep in mind, though, that this is not a guaranteed solution and may have unintended consequences. 

    I would look for Microsoft docs for /LARGEADDRESSAWARE since I cannot reference it. 


    Friday, March 3, 2023 5:03 AM
  • The RAM limit for x86 applications developed in VB.NET is determined by the operating system and the hardware of the computer. To increase the RAM limit for your application, you can try the following options:

    Use a 64-bit operating system: If your computer is running a 32-bit operating system, your application will be limited to a maximum of 4GB of RAM. By upgrading to a 64-bit operating system, your application can access much more RAM.

    Enable the /LARGEADDRESSAWARE option: This option allows your application to use up to 3GB of RAM on a 32-bit operating system. To enable this option, you need to modify the executable file of your application using a tool like editbin.exe.

    Optimize your code: If your application is using a lot of memory, you can try to optimize your code to reduce its memory footprint. For example, you can use data structures that consume less memory or release memory when it's no longer needed.

    Use a memory profiler: A memory profiler can help you identify memory leaks and other memory-related issues in your application. By fixing these issues, you can reduce the amount of memory your application uses.
    22 hours 45 minutes ago