none
How is system memory handled in applications built on the .NET 4.0 Framework - I am getting out of memory exceptions no matter how much ram on the PC? RRS feed

  • Question

  • I am using an application and the vendor says it is built on the .NET 4.0 framework. They say:

    "CardExchange is build on Microsoft's Windows Presentation Foundation, which is part of the .NET Framework 4.0. Obviously, we have no control about the way Microsoft handles the memory."

    I am filling up memory with several objects in the application. I get to a certain point where I have 11 objects, everything is fine, but when I try to add more, the system crashes giving me an "out of memory exception".

    I moved the application from a PC running a Dual Core Processor with 8gb Ram to a PC running on a Quad Core processor and 32GB Ram and I get the same thing.

    Is there a way or a setting in the framework that places a limit on how memory is handled in an application?

    • Moved by Barry Wang Tuesday, March 5, 2013 4:41 AM CLR related
    Monday, March 4, 2013 8:14 PM

All replies

  • Hi Iytwally,

    Welcome to the MSDN Forum.

    Would you like to make a test project to reproduce this scenario?

    For this kind of question, you can also try this similar thread to troubleshoot it: http://stackoverflow.com/questions/2985408/net-out-of-memory-troubleshooting  

    Best regards,


    Mike Feng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, March 5, 2013 12:42 PM
    Moderator
  • Hi,

    can you give more details about the application and the operatign system you are using?

    Alaways be aware that a process on a 32Bit operating system can only manage a limited amount of memory and that is independend on the RAM you have in your system.

    So if you have to work with large objects (e.g. pictures) you have to be carefull. Make sure that you release memory when it is no longer required (e.g. calling Dispose on IDisposable objects).

    If you are running on a 64Bit operating system, you can consume a lot of memory. We have processes using multiple GB of RAM without any problem. Also be aware that the physical memory is not the limiting factor. Even with just 8GB RAM a process could get more memory - all you need to configure is virtual memory. (But that is slow of ocurse!)

    With kind regards,

    Konrad Neitzel

    Tuesday, March 5, 2013 2:20 PM
  • if you are using a 3rd party system/tool, and the problem is pop from these stuffs, you should approach them(vendor/supplier) for resolution.

    unless you also have your own coding manipulating/involved in the process, and you think you can manage/workaround the issues on your end/coding, only then you look into this approach.


    • Edited by Kelmen Wednesday, March 6, 2013 5:41 AM
    Wednesday, March 6, 2013 5:40 AM
  • A nice article

    Mark Answered, if it solves your question and Vote if you found it helpful.
    Rohit Arora

    Wednesday, March 6, 2013 10:34 AM