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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 19, 20262026-05-19T14:45:57+00:00 2026-05-19T14:45:57+00:00

I have to create a fairly large double array 12000ish x 55000ish. Unfortunately, I

  • 0

I have to create a fairly large double array 12000ish x 55000ish. Unfortunately, I get an out of memory exception. I used to develop in Java and could change the memory settings. Is this possible with C# or is it just impossible? I am using VS 2008.

  • 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-05-19T14:45:58+00:00Added an answer on May 19, 2026 at 2:45 pm

    Each double is 8 bytes, so you’re trying to allocate a single array with just over 5GB. The CLR has a per-object limit of around 2GB IIRC, even for a 64-bit CLR. In other words, it’s not the total amount of memory available that’s the problem (although obviously you’ll have issues if you don’t have enough memory), but the per-object size.

    I suggest you split it into smaller arrays, perhaps behind a facade of some description. I don’t believe there’s any way to workaround that limit for a single array.

    EDIT: You could go for an array of arrays – aka a jagged array:

    double[][] array = new double[12000][];
    for (int i = 0; i < array.Length; i++)
    {
        array[i] = new double[55000];
    }
    

    Would that be acceptable to you?

    (You can’t use a rectangular array (double[,]) as that would have the same per-object size problem.)

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

Sidebar

Related Questions

I have a fairly large repetitive XML to create using JAXB. Storing the whole
If there are any DBAs out there, I'm making a fairly large piece of
I have a fairly large MVC3 application, of which I have developed a small
I have a fairly large CRUD WinForm app that has numerous objects. Person, Enrollment,
I have a fairly large Lucene.net index (created with the latest version - 2.9).
So, my issue is that I have a fairly large ASP.NET 3.5 project that
I have fairly large C++ library with several sub-libraries that support it, and I
I have a fairly large EF4 model, using POCO code gen. I've got lots
I have a fairly large program written in C. It spans several files, and
So I will have a fairly large list of plot keywords in an xml

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.