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 8227339
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T16:05:52+00:00 2026-06-07T16:05:52+00:00

We have a project that is getting an Out of memory exception. I’m trying

  • 0

We have a project that is getting an “Out of memory exception”. I’m trying to debug this memory leak issue. The problem is that the production machines have about 1-2 GB of memory and the development machines have 6 GB. And I am finding it very difficult to reproduce the crash.

Is there a way in visual studio that I can reduce the amount of memory allowed to be allocated to a debug instance?

  • 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-07T16:05:54+00:00Added an answer on June 7, 2026 at 4:05 pm

    The amount of RAM in a machine has nothing to do with an OutOfMemoryException. You’ll get that exception when the process runs out of virtual memory, failing to find a hole in the address space that’s big enough to fit an allocation request. That usually happens when the VM size of the process starts getting close to 1.5 GB on a 32-bit machine.

    Limiting the amount of virtual memory space is easy enough, just create a bunch of byte[] arrays at the start of your program and store them in a static variable. This doesn’t help diagnose a memory leak at all, it merely trips the exception quicker. Use a memory profiler to find the real problem.

    And do consider the possibility that this isn’t a leak at all, it’s not that easy to leak with a garbage collector. But just a side effect of your program processing and storing a lot of data. Which is trivially solved with a 64-bit operating system, it provides oodles of virtual memory space, limited only by the maximum size of the paging file. Not RAM.

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

Sidebar

Related Questions

We have a project that runs fine on OS4 but we're having problems getting
I have CSLA (1.x framework) objects from an existing project that I'm trying to
Been trying to figure this one out all day. I have a large text
I have one project that I checked out from one SVN repository location and
I am using xcode (3.2.3) for an iPhone project that I have checked out
I'm trying to use the CRT memory leak detection but I keep getting the
I have a Android Actionscript project that I am trying to incorporate sound in,
I'm trying to write a project that will have some autonomous components. One of
I have a Jenkins server that keeps running out of memory and cannot create
I have a project in python that I am trying to run from IDLE

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.