By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,917 Members | 1,287 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,917 IT Pros & Developers. It's quick & easy.

Unable to consume Process reserved memory

P: n/a
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.

Aug 6 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Aravind wrote:
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
Aug 6 '05 #2

P: n/a
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

Aug 6 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.