Can .NET handle such memory requirement?

  • Thread starter Thread starter Curious
  • Start date Start date
C

Curious

I have a C#.NET project in which I'll need to load up information
about 4000 securities into memory.

Each security has 21 days of daily data in memory.

Each daily data contains 20 items in memory such as open price (double
type), close price (double type), etc.

Therefore, I'm looking at 4000 * 21 * 20 = 1,680,000 memory usage. Can
C#.NET environment handle this much memory (without giving a
insufficient memory exception)?
 
Curious said:
I have a C#.NET project in which I'll need to load up information
about 4000 securities into memory.

Each security has 21 days of daily data in memory.

Each daily data contains 20 items in memory such as open price (double
type), close price (double type), etc.

Therefore, I'm looking at 4000 * 21 * 20 = 1,680,000 memory usage. Can
C#.NET environment handle this much memory (without giving a
insufficient memory exception)?

Why not check it out? I think it depends on your system memory. I wrote
a little test programme that creates 50 millions simple objects (with
only a single integer in each) and adds them to a list. It needs about
17 bytes per object (after garbage collection; including the list).

The programme then occupies 805 MB of memory and that is a lot for my 2
GB notebook with Vista on it.

Markus
 
Why not check it out? I think it depends on your system memory. I wrote
a little test programme that creates 50 millions simple objects (with
only a single integer in each) and adds them to a list. It needs about
17 bytes per object (after garbage collection; including the list).

The programme then occupies 805 MB of memory and that is a lot for my 2
GB notebook with Vista on it.

Markus

Thanks for the advice! I'll check it out. It doesn't sound like a good
idea to use a lot of memory. I'll try to load only a portion of the
objects into memory at the same time.
 
If you need to store your objects in an easily retrievable form, you can
use object persistence.

For example, you can store your objects in Eloquera object database,
and get them back as needed. So, you don't have to use any relational
mapping and data layer.

You can download Eloquera from http://www.eloquera.com for free.

Cheers,
pennanth
 
Back
Top