Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8664547
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:16:00+00:00 2026-06-12T17:16:00+00:00

We programmed an application which is a number crunching simulation that needs to run

  • 0

We programmed an application which is a number crunching simulation that needs to run for 24 hrs non-stop.
It uses painting event in windows form to render visual representation of the subject continuous, plus we are using several realtime graphs and grids to show the progress of the project objects. It is a .NET windows form application.

After 4 hrs we get System outOfMemory Exception.

Memory Profiler shows us that if we tradeoff some realtime graphs and some other undisposed objects, we can save ‘some'(35%-40%) memory.

My concern is it’ll still not run for 24hrs non-stop. We already have 4GB RAM on our HP 8440p Elitebook Intel i5 with 32-Bit Win7 installed.

Our objective is to have maximum possible memory provision for our simulation application and for the .NET CLR on which it’s running.
Will investing in more memory (perhaps 8GB) and 64-bit OS help? What other possible CLR options do I need to consider besides adding more hardware?

Thanks a lot.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:16:01+00:00Added an answer on June 12, 2026 at 5:16 pm

    @Adam Houldsworth’s suggestion is a very good one. You might be facing a memory leak (references to stale objects are still being kept, very frequently by a live event subscription as Adam suggested, this prevents them from being garbage-collected).

    @mkimes answer is also very valuable. Indeed, running as a 64-bit process will allow your application to manage much more memory, but still, there are some caveats (like the 2GB limit of a single object’s size).

    If you intuitively feel that the application should not be running out of memory because, in your reasoning, most created objects are short-lived and should have been disposed, then you probably are facing a memory leak. However, if the process is building up a large amount of objects that should be kept alive after the process is finished or during a lengthy phase of computation, then you might be hitting the 32-bit memory limit barrier, especially considering that during a full garbage collection cycle, the application’s memory will tend to temporarily grow near twice the current allocated size, keeping the practical 32-bit memory-size limit around 1GB.

    There is a Windows configuration switch that allows increasing the memory size a 32 bit application can handle to 3GB, however in my experience this made the operating system unstable (very frequent blue screens), so explore this option with care.

    If you suspect a memory leak:

    This article might help, it shows you how to use Windgb (an advanced debugger) to trace the objects that might be keeping unwanted, stale references alive.

    Also (hope not), you might be victim of a very nasty problem that is memory fragmentation that can be induced by repeated, frequent allocations of what the CLR considers “large objects”, that is, objects larger than 85,000 bytes in size. Here is an article detailing the problem. Basically, such objects are allocated under a different heap that is disposed, but unfortunately, never compacted. This means that freed memory blocks will be interspersed with allocated blocks and the runtime might not find, at some point, a single contiguous block of memory to fulfill a memory request, triggering an out-of-memory exception. If this is the case, breaking up a large, monolithic object into smaller objects will help.

    Finally, no object can be larger than 2GB in size even under 64-bits, so you must be aware your collections and/or arrays are not reaching this limit.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I run an in-house application, programmed with visual studio 2008, that uses SQL Server
I have programmed (VS2010 SP1, C#) an application which uses a Microsoft SQL Server
At work, we are developing an PHP application that would be later re-programmed into
Let's say I've programmed an application which connects to a server using the Socket
I'm planning a project which will consist of a Windows Server Application programmed in
I'm working at a company that uses SCCS internally for developing it's main application.
Im writing application that communicate (via serial port) with electronic device which i designed
There is a console Java application which is supposed to run until it is
I have programmed a little application in which you can register and edit your
I have an application which uses some Tabs. The functionality of these tabs is

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.