PDA

View Full Version : Program running out of memory - increase memory size



DBQ
December 10th, 2008, 06:16 AM
Hi everybody. My console program runs out of memory. Is there a way, before I run the program to increase the size of the memory the program is allowed to use?

Thank You.

psusi
December 10th, 2008, 07:36 AM
It should be allowed to use as much as you have. You probably have a memory leak so it is using all of it up.

mssever
December 10th, 2008, 08:24 AM
The answer to this question depends on the language you're using. Some languages (PHP comes to mind, but surely there are others) impose a memory limit on processes under certain circumstances. Others don't, and if you run out of memory it's because your system has run out of memory.

So, your questions are:


Why are you running out of memory?
Is the amount of memory your program is trying to use reasonable?

grepgav
December 10th, 2008, 09:03 AM
Memory allocation is usually handled by the Operating System, unless like the other poster mentioned you are using something like PHP that sets a cap for user programs. If you are managing the memory (something like c) you should make sure you are freeing up memory.

crazyfuturamanoob
December 10th, 2008, 12:43 PM
Perhaps you could show the code to let us see if the problem is with memory leaks, as mentioned before.

What error message you got?

Cracauer
December 11th, 2008, 03:43 AM
Hi everybody. My console program runs out of memory. Is there a way, before I run the program to increase the size of the memory the program is allowed to use?


What happens, exactly?

What kind of program?