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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T08:10:05+00:00 2026-06-14T08:10:05+00:00

I have got a 2 GB machine. Before running my exe, I have got

  • 0

I have got a 2 GB machine. Before running my exe, I have got 1.1 GB free memory. When I run the exe which is only one line you can find below, I am getting out of memory exception.

I am expecting the following line to use something around 600 Million Bytes. Does MemoryStream class use more memory than initalized capacity?

MemoryStream memory = new MemoryStream(600000000);
  • 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-14T08:10:06+00:00Added an answer on June 14, 2026 at 8:10 am

    According to the following Q&A, it is likely that it is because your EXE is unable to allocate 600 megs of contiguous memory. ( I was trying to find something in the docs, this is the best I could come up with on short notice. )

    http://social.msdn.microsoft.com/Forums/en-US/csharpgeneral/thread/1af59645-cdef-46a9-9eb1-616661babf90

    “An “out of memory” error almost never happens because there’s not
    enough storage available; as we’ve seen, storage is disk space, and
    disks are huge these days. Rather, an “out of memory” error happens
    because the process is unable to find a large enough section of
    contiguous unused pages in its virtual address space to do the
    requested mapping.”

    Interestingly, that answer linked to Eric Lippert’s blog post:
    http://blogs.msdn.com/b/ericlippert/archive/2009/06/08/out-of-memory-does-not-refer-to-physical-memory.aspx

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

Sidebar

Related Questions

I have got the requirement to find the core file in multiple box/machine and
Have got an NSString *str = @12345.6789 and want to find out if there
I have got a form into which information is entered, and a drop down
I have got a table [newsletter] in the db, which saves the email address,
I have got a few tables which I am trying to join. I just
I have a Joomla site running on a windows machine. The site was at
I've got three computers which should have the same settings for all their applications.
I have got a serious problem running our web app in some machines.. machines
I have an ASP/C#(4.0) app that was been running on my machine for several
I have develop a site using wordpress. Its running fine on local machine (windows

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.