What is the purpose of the LongLength property for arrays in .Net. Using a standard integer for length, you could accommodate up to 2 billion indices. Are there really people using .Net to maintain a single array with more the 2 billion elements. Even if each element was a single byte, that would still be 2 GB of data. Is it feasibl...
I have a daily batch process that involves selecting out a large number of records and formatting up a file to send to an external system. I also need to mark these records as sent so they are not transmitted again tomorrow.
In my naive JDBC way, I would prepare and execute a statement and then begin to loop through the recordset. As ...
I'm writing a little arcade-like game in C++ (a multidirectional 2d space shooter) and I'm finishing up the collision detection part.
Here's how I organized it (I just made it up so it might be a shitty system):
Every ship is composed of circular components - the amount of components in each ship is sort of arbitrary (more components, ...
I've been programming a long time, and the programs I see, when they run out of memory, attempt to clean up and exit, i.e. fail gracefully. I can't remember the last time I saw one actually attempt to recover and continue operating normally.
So much processing relies on being able to successfully allocate memory, especially in garbage c...
I'm looking for an explanation or good free online resources about the organization of memory and memory management in Windows systems.
...
When trying to launch and run a flex/java project in eclipse I kept getting a "Out of Memory Exception" and "Java Heap Space" using Eclipse, Tomcat and a JRE.
While researching trying to adjust the memory settings I found three places to adjust these:
Eclipse.ini
The JRE Settings under Window > Preferences
Catalina.sh or Catalina.bat
...
I'm looking into why a managed process is using a lot of memory. Is there a way to run GC.Collect(3) from WinDbg, so that I can focus on the actual memory allocation?
...
I've had a couple of complaints that one of our managed apps is using 20-25Mb of RAM. I normally push back and say that memory's cheap; get over it.
Is this reasonable for a Windows Forms app?
...
I have a Java applet (an actual <APPLET>) which generates frequent log messages to System.out. If the Java Console is enabled in the user's browser, it will of course retain references to all of these strings and prevent them from being garbage collected. The problem is the number of log messages the console retains: the applet heap grow...
I went looking for this the other day, and thought it should probably be added to StackOverflow's reservoir of questions.
How would I go about dynamically allocating a multi-dimensional array?
...
I have inherited a Java applet (an actual <APPLET>) which throws an OutOfMemory exception after about 4 days of runtime. The nature of the applet is such that people really will leave it open for long periods of time.
After almost two days running, jmap -histo shows the top heap consumers as:
num #instances #bytes class name
...
I'm using Microsoft Visual C++ 2008 Express, and have a pretty annoying problem. It doesn't seem to happen in XP but in Vista I can't find a way around it. Whenever I declare variables non-dynamically, if their combined size exceeds about 30mb, the program will crash immediately at start-up. I know that Vista limits non-Win32 apps to 32m...
Hi,
I have a 1GB file containing pairs of string and long.
What's the best way of reading it into a Dictionary, and how much memory would you say it requires?
File has 62 million rows.
I've managed to read it using 5.5GB of ram.
Say 22 bytes overhead per Dictionary entry, that's 1.5GB.
long is 8 bytes, that's 500MB.
Average string len...
Hi all,
I am doing some calculations that require a large array to be initialized. The maximum size of the array determines the maximum size of the problem I can solve.
Is there a way to programmatically determine how much memory is available for say, the biggest array of bytes possible?
Thanks
...
I wanted to know what people used as a best practice for limiting memory on IIS [5/6/7]. I'm running on 32bit web servers with 4GB of physical memory, and no /3GB switch. I'm currently limiting my app pools to 1GB used memory. Is this too low? any thoughts?
...
Is it true that the smallest amount of memory that I can allocate in managed code is a byte?
Do I understand correctly that a Boolean variable takes up much more than a bit of memory?
Is there a way for me to allocate memory, in .net, in chunks smaller than a byte?
...
than just to call the parameter as it is?
...
We are sometimes getting an OutOfMemoryError in production and I would like to be able to analyse what caused the problem, or at least what was going on when it occurred. It seems that I should be able to get an HProf profile by using the -XX:+HeapDumpOnOutOfMemoryError option, but I have read that this is JVM specific.
Has anyone succe...
On my machine (XP, 64) the ASP.net worker process (w3wp.exe) always launches with 5.5GB of Virtual Memory reserved. This happens regardless of the web application it's hosting (it can be anything, even an empty web page in aspx).
This big old chunk of virtual memory is reserved at the moment the process starts, so this isn't a gradual ...
I am inputting a 200mb file in my application and due to a very strange reason the memory usage of my application is more than 600mb. I have tried vector and deque, as well as std::string and char * with no avail. I need the memory usage of my application to be almost the same as the file I am reading, any suggestions would be extremely ...