Windows XP: "Out of Memory" + 2 GB RAM

K

Keping

Hi,

Just got a new computer for quickly processing some large images. The
machine has the following specifications:

- Windows XP SP1
- 2 GB RAM
- >100 GB Hard disk space
- NVIDIA GeForce 5700 display device
- etc.

I was so anxious to test the full power of the new computer with an
image processing program developed in MS VC++. On one occasion, I
tried to read a very large data set consisting of six bands each with
the size of 15,000*15,000 pixels, by putting them in memory using
straighforward "new"/"delete" commands. When allocating these images
in RAM, however, an error message pops up, saying "Out of Memory". By
checking the "Task Manager", just after the program consumes more then
1G RAM, this error message pops up. In fact, another 1GB RAM is still
left and unused. I tried to change the size of virtual memory in the
system, and it has no effect.

Could you please offer some suggestions or solutions, either hardware
or software-related?

Thanks
Keping
 
G

Guest

T

Tom

Keping said:
Hi,

Just got a new computer for quickly processing some large images. The
machine has the following specifications:

- Windows XP SP1
- 2 GB RAM
- >100 GB Hard disk space
- NVIDIA GeForce 5700 display device
- etc.

I was so anxious to test the full power of the new computer with an
image processing program developed in MS VC++. On one occasion, I
tried to read a very large data set consisting of six bands each with
the size of 15,000*15,000 pixels, by putting them in memory using
straighforward "new"/"delete" commands. When allocating these images
in RAM, however, an error message pops up, saying "Out of Memory". By
checking the "Task Manager", just after the program consumes more then
1G RAM, this error message pops up. In fact, another 1GB RAM is still
left and unused. I tried to change the size of virtual memory in the
system, and it has no effect.

Could you please offer some suggestions or solutions, either hardware
or software-related?

Thanks
Keping

Take a look at the program you are using to view the image and check
wherever the preference settings are. Chances are, the program automatically
assigns itself RAM before any usage occurs.

i.e. Photoshop, when freshly installed, will have set to use 75% of system
memory to itself when launched by default, but changes can be made.
 
K

Keping

Tom said:
Take a look at the program you are using to view the image and check
wherever the preference settings are. Chances are, the program automatically
assigns itself RAM before any usage occurs.

i.e. Photoshop, when freshly installed, will have set to use 75% of system
memory to itself when launched by default, but changes can be made.

Thanks for your suggestion.

My situation is not what you expected, and the program does not have
that option for settings. I am just guessing the problem of "Out of
Memory" could be related to the way of allocating a large block of
memory using the "new" method. Is that possible?
 
K

Keping

Thanks for your suggestion.

My situation is not what you expected, and the program does not have
that option for settings. I am just guessing the problem of "Out of
Memory" could be related to the way of allocating a large block of
memory using the "new" method. Is that possible?

Figured it out. The "problem" is related to when the memory should be
allocated as the program runs. If I move those memory allocation codes
to the top of the program, not at the point where such requests are
needed, it seems working properly.

Now this problem from a rare experiment is over.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top