473,383 Members | 1,789 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Creating a 1 GB Byte Array (System.OutOfMemoryException)

Hello,

I need to create a 1 GB Byte array in memory. I can create it on a
Win2000 system. On a Win2003 system, the application throws a
System.OutOfMemoryException error. Both are running the latest .Net
Framework 2.0. Creating a 512 MB array works fine.

Any suggestions on what to check or change?

Thanks in advance,

J Wolfgang Goerlich

Mar 23 '06 #1
5 3742
Hi Wolfgang :)

why don't you also describe your general problem?

It is possible that strategies can be found (buffering, etc) and
perhaps here you would find some suggestions. In general, even if
possible, it does not seem a good idea to create objects of that size,
especially under windows... If possible, I would think twice about the
program architecture...

Anyway, how much memory is available on the respective the 2 machine
when you start creating the array, have you checked that value ?

-tom

jw********@gmail.com ha scritto:
Hello,

I need to create a 1 GB Byte array in memory. I can create it on a
Win2000 system. On a Win2003 system, the application throws a
System.OutOfMemoryException error. Both are running the latest .Net
Framework 2.0. Creating a 512 MB array works fine.

Any suggestions on what to check or change?

Thanks in advance,

J Wolfgang Goerlich


Mar 24 '06 #2
Wolfgang,

Well, I guess you could put more memory in the machine. But, geez, a 1
GB byte array is huge. What do you plan on doing with it?

Brian

jw********@gmail.com wrote:
Hello,

I need to create a 1 GB Byte array in memory. I can create it on a
Win2000 system. On a Win2003 system, the application throws a
System.OutOfMemoryException error. Both are running the latest .Net
Framework 2.0. Creating a 512 MB array works fine.

Any suggestions on what to check or change?

Thanks in advance,

J Wolfgang Goerlich


Mar 24 '06 #3
to**************@uniroma1.it wrote:
Hi Wolfgang :)

why don't you also describe your general problem?

In general, even if
possible, it does not seem a good idea to create objects of that size,
especially under windows... If possible, I would think twice about the
program architecture...


I'd certainly support Tom's suggestion. There must be a way to avoid
creating such an enormous array. I've never seen an instance where this
would be absolutely necessary - I'm not saying it can't happen, I'm
saying it's highly likely that another approach is available.

Please at least supply an overview of your application.

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
Mar 24 '06 #4

<jw********@gmail.com> wrote in message
news:11**********************@i40g2000cwc.googlegr oups.com...
I need to create a 1 GB Byte array in memory.


Why?

Mar 24 '06 #5
Tom write:
why don't you also describe your general problem?
Stress testing in preparation for a very memory and disk intensive
application. I need to stream as much data as possible from memory to
disk, as fast as possible. I am then doing the reverse, reading disk to
memory. All the while, I am timing and watching the utilization on
various levels.

Brian Gideon wrote: Well, I guess you could put more memory in the machine.


My test machine is a aging but adequate. It is an IBM xSeries 350
server, with a 700 MHz Xeon processor and 4 GB of memory. I do not
think this is a hardware issue. As mentioned, I can create this array
when Win2000 is the OS, but not when Win2003 is (same VB.Net app, same
hardware).

Regards,

J Wolfgang Goerlich

Mar 24 '06 #6

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: David Cook | last post by:
Java's InetAddress class has some methods that use a byte-array to hold what it describes as a 'raw IP address'. So, I assume that they mean an array like: byte ba = new byte; would hold an...
1
by: Ripul Handa | last post by:
Hi We are running IIS 5.0 cluster with cisco local director. We are running a website on 2 webservers and I have been observing that from past few days we have are getting this error message of...
1
by: SMG - Idealake | last post by:
Hi all, I am getting following error on my error, what could be the reason? Exception of type System.OutOfMemoryException was thrown. Description: An unhandled exception occurred during the...
2
by: twawsico | last post by:
I have a piece of code that needs to read the contents of a binary file (that I've created with another app) into an array of structures. The binary data in the file represents just a series of...
5
by: Gerrit | last post by:
Hi all, I'm getting an OutOfMemoryException when I initialize a byte array in C# like this: Byte test = new Byte; I'm using ASP.NET 2.0. In ASP.Net 1.1 it works fine. So what am I doing
8
by: Robert Dufour | last post by:
I been trying to look for samplecodes on how to create a simple tif file. I found a lot of commercial and stuff but I would prefer to roll my own. I only need to put some formatted text in a tif...
1
by: MimiMi | last post by:
I'm trying to decrypt a byte array in java that was encrypted in C#. I don't get any error messages, just a result that's completely not what I was hoping for. I think I am using the same type of...
2
by: MimiMi | last post by:
I'm trying to decrypt a byte array in java that was encrypted in C#. I don't get any error messages, just a result that's completely not what I was hoping for. I think I am using the same type of...
5
by: Aryan | last post by:
Hi, I am using C# with framework 2.0 and creating PDF files on-fly, along with this I am using Windows 2003 Server. I am using Byte to take the data input and then save into pdf format on...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.