Unable to consume Process reserved memory

A

Aravind

Hi ,
This is a Windows form application which interacts with the unmanaged
C++ codes . In unmanaged c++ code we allocate around 130MB on the heap
for annalysing high resolution images .

Earlier during the processing ee do lot of process on the image and the
memory reaches high at one point of time to 1.2GB , after that we clear
all the memory being used so the memory in the task manager comes to
really low.
Also I am calling CompactHeap function in the c++ to get contigous
memory space.

Then when we read the processed high resolution image (130MB ) it is
going to out of memory exception . At this point I run memory analyser
and analysed the process memory , the reserved memory in the process is
good enough and the free memory in the process is really low . I am
wondering why the system is not taking the memory from the reserved
memory space and how to make the reserved memory into free memory space
for the process , can u force the process to get the reserved memory?

Regards
Aravind.
 
V

Victor Bazarov

Aravind said:
This is a Windows form application [...]. I am
wondering why the system is not taking the memory from the reserved
memory space and how to make the reserved memory into free memory
space for the process , can u force the process to get the reserved
memory?

Please ask about Windows-specific things in a Windows programming
newsgroup. If you do 'delete' after 'new' (or 'delete[]' after
'new[]'), you're fine AFA C++ is concerned. Anything specific to
any particular platform is OT here.

V
 
R

Ram

This post is not so relevant to this newsgroup. You should better post
to some windows/Visual C++ specific NG, still I am interested.
This is a Windows form application which interacts with the unmanaged
C++ codes . In unmanaged c++ code we allocate around 130MB on the heap
for annalysing high resolution images .
What do u mean by unmanaged C++ code?
Earlier during the processing ee do lot of process on the image and the
memory reaches high at one point of time to 1.2GB , after that we clear
all the memory being used so the memory in the task manager comes to
really low.
Also I am calling CompactHeap function in the c++ to get contigous
memory space.

The information which u hv provided is not sufficient. How do u clear
memory? Some STL containers don't actually release memory when u think
they do e.g. calling std::vector::clear() need not give the memory back
to the system.
Then when we read the processed high resolution image (130MB ) it is
going to out of memory exception . At this point I run memory analyser
and analysed the process memory , the reserved memory in the process is
good enough and the free memory in the process is really low . I am
wondering why the system is not taking the memory from the reserved
memory space and how to make the reserved memory into free memory space
for the process , can u force the process to get the reserved memory?

What does it exactly mean by reserved and free memory in the process?

-Ramashish
 

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

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,900
Latest member
Nell636132

Latest Threads

Top