"Out of Memory" on a machine with 2GB 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++ 6.0. 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 ranging from 3 to 4 GB, and it has no success.

Could you please offer some suggestions or solutions, either hardware
or software-related? Is it possible this to do with the relatively old
compiler, VC++ 6.0, and the "new" command?

Thanks
Keping
 
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++ 6.0. 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 ranging from 3 to 4 GB, and it has no success.

Could you please offer some suggestions or solutions, either hardware
or software-related? Is it possible this to do with the relatively old
compiler, VC++ 6.0, and the "new" command?

Thanks
Keping


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.
 
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++ 6.0. 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 ranging from 3 to 4 GB, and it has no success.

Could you please offer some suggestions or solutions, either hardware
or software-related? Is it possible this to do with the relatively old
compiler, VC++ 6.0, and the "new" command?

Thanks
Keping

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