473,414 Members | 1,766 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,414 software developers and data experts.

Unable to consume Heap reserved memory



Hi ,
A Windows form application which interacting 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.

Regards
Aravind.
*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #1
3 1959
Hi,

Maybe some code that shows how you do the managed/unmanaged code interaction
would help diagnose the problem.

Hector

"Aravindakumar Venugopalan" <ar*************@gmail.com> wrote in message
news:O6**************@TK2MSFTNGP10.phx.gbl...


Hi ,
A Windows form application which interacting 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.

Regards
Aravind.
*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #2
Thanks for your reply,

The unmanaged / managed is through usual interop servies ,
Actually the problem is not occuring when I donot process the image that
fills and after clears the memory . Once I process the image that
consumes and clears the memory , disposed memory goes to the reserved
memory , after that if i allocate memory on the heap of 130MB for the
image it leads to out of memory exception .

I am wondering how to clear the reserved memory and make it as free
memory that the process can use for alloting when i say CALLOC ( 130 MB
), will the heap manager takes care of that.

Regards
Aravind.

*** Sent via Developersdex http://www.developersdex.com ***
Nov 17 '05 #3
Mind to tell us what CompactHeap really is?
I'm also not sure what you mean with this ...
after that we clear
all the memory being used so the memory in the task manager comes to
really low.
What exactly do you mean with "clear the memory" and what exactly you are
looking at in taskman?
I would suggest you take a look at the memory consumption using perfmon,
herewith you can inspect managed heap (CLR memory counters) and non managed
heap memory (process counters).
I would also suggest you read about memory management and GC heap management
in windows application.

Willy.

"Aravindakumar Venugopalan" <ar*************@gmail.com> wrote in message
news:O6**************@TK2MSFTNGP10.phx.gbl...

Hi ,
A Windows form application which interacting 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.

Regards
Aravind.
*** Sent via Developersdex http://www.developersdex.com ***

Nov 17 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: jose luis fernandez diaz | last post by:
Hi, The program below gets 1 byte of heap memory: int main(void) { char *ptr = new char; } Is there a C system call that give the amount of memory reserved by a process ?
15
by: John Doe | last post by:
Hi all, I know the standard doesn't care about threads (wrongly :-) But in current compilers implementation, is the "list" which holds count of the occupied and free heap addresses SHARED among...
2
by: Aravind | last post by:
Unable to consume Process reserved memory 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...
9
by: gold | last post by:
Hello all, I want know abt wht kind of datastructures using both C & C++ internally. Some were said heap, others said tree anyone can explain brief?
9
by: shine | last post by:
what is the difference between a heap and a stack?
5
by: Johndoe | last post by:
Hi, A struct lives on the stack, right? What happens if I create a struct that contains a reference type? I'm guessing that there will be a pointer on the stack refering to my reference type....
16
by: sarathy | last post by:
Hi all, I need a few clarifications regarding memory allocaion in C++. I apologize for the lengthy explanation. 1. In C++, Objects are allocated in heap. What does heap refer to? Is it an area...
0
by: nimjerry | last post by:
i am using db2 udb V 9 on aix 5.3 and in db2diag.log alwas has this error occurr below is sample message 2008-03-03-09.45.34.366406+420 I306667A443 LEVEL: Warning PID : 835622 ...
1
by: sanddune008 | last post by:
I would like to know how much memory does the following declatations consume? typedef struct { unsigned int type:2; unsigned int Specific:1; unsigned int direction:1; unsigned int...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.