Maximum number of elements in a 2D array

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Tales Normando

    Maximum number of elements in a 2D array

    Hi,

    I'm writing a program where I need to generate a huge 2D table
    (average 10000x5000) and I'm concerned about limitations in the number of
    elements and memory space. Is it too big for .NET standards? Will it
    generate an OutOfMemoryExce ption? What other approachs are available to me?


    Tales Normando


  • Jon Skeet [C# MVP]

    #2
    Re: Maximum number of elements in a 2D array

    Tales Normando <talesmn@bol.co m.br> wrote:[color=blue]
    > I'm writing a program where I need to generate a huge 2D table
    > (average 10000x5000) and I'm concerned about limitations in the
    > number of elements and memory space. Is it too big for .NET
    > standards? Will it generate an OutOfMemoryExce ption? What other
    > approachs are available to me?[/color]

    Well, what's the size of each element? If they're just ints, then a
    10000x5000 array will only take up about 200 megs - if you've got
    enough memory in your computer, that should be fine.

    It's hard to know what other approaches are available without knowing
    what you need to do with the table.

    --
    Jon Skeet - <skeet@pobox.co m>
    Pobox has been discontinued as a separate service, and all existing customers moved to the Fastmail platform.

    If replying to the group, please do not mail me too

    Comment

    Working...