none
OutOfMemory Exception RRS feed

  • Question

  • Hello,

    One of my VB programs has to deal with loads of data. I keep getting OutOfMemory exception while running it.
    I monitored the memory usage from task manager Private=495M and CommitSize=521M.

    1) What is the max memory I can have per process?
    2) How do I allow more memory for my this program?

    I am using Windows 2008 Standard 32 bit and .NET Framework is 3.5

     


    n00b for life
    Friday, January 14, 2011 8:15 AM

Answers

  • even you use 64bits OS and compile your application target platform to 64bits, a single object max memory still be 2GB.


    for more details , please read MSDN library [Visual Studio 2010 64-bit Applications ]

    When you run a 64-bit managed application on a 64-bit Windows operating system, you can create an object of no more than 2 gigabytes (GB).


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。
    Friday, January 14, 2011 3:26 PM

All replies

  • Use a 64 bit OS.  Nothing else is worth considering.  A modern server has to be 64 bit to be practical.
    Friday, January 14, 2011 8:23 AM
  • even you use 64bits OS and compile your application target platform to 64bits, a single object max memory still be 2GB.


    for more details , please read MSDN library [Visual Studio 2010 64-bit Applications ]

    When you run a 64-bit managed application on a 64-bit Windows operating system, you can create an object of no more than 2 gigabytes (GB).


    在現實生活中,你和誰在一起的確很重要,甚至能改變你的成長軌跡,決定你的人生成敗。 和什麼樣的人在一起,就會有什麼樣的人生。 和勤奮的人在一起,你不會懶惰; 和積極的人在一起,你不會消沈; 與智者同行,你會不同凡響; 與高人為伍,你能登上巔峰。
    Friday, January 14, 2011 3:26 PM
  • Well I shouldn't be hitting any limits yet. 

    n00b for life
    Sunday, January 16, 2011 10:46 AM
  • On 32Bits it is 2Gb max.
    Success
    Cor
    Sunday, January 16, 2011 10:50 AM
  • Can you re-structure your program to use less RAM? For example, writing results to disk at intermediate stages or using a database to hold the data.

    --
    Andrew

    Sunday, January 16, 2011 1:59 PM
  • Well I shouldn't be hitting any limits yet. 
    Your system is 32 bits.  You have 2 GB for all running processes.  GC wants contiguous memory; typicallly 400 to 600 MB on a 32 bit system.
    Sunday, January 16, 2011 3:21 PM