473,782 Members | 2,623 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1972
Hi,

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

Hector

"Aravindaku mar Venugopalan" <ar************ *@gmail.com> wrote in message
news:O6******** ******@TK2MSFTN GP10.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.

"Aravindaku mar Venugopalan" <ar************ *@gmail.com> wrote in message
news:O6******** ******@TK2MSFTN GP10.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
1649
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
401
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 various threads or not? I don't know if I was clear: Case1: the list which holds count of what is free and what is occupied is SHARED among all the threads. In this case each
2
1658
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 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...
9
2215
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
3385
by: shine | last post by:
what is the difference between a heap and a stack?
5
2720
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. I'm not 100% sure. Can someone please confirm? Thanks.
16
4451
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 in RAM/Memory or does it refer to a data structure being used for storing objects. 2. In C++, functions and its local variables go in stack. If local variables that are primitives go in stack, it is OK. But what
0
5088
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 TID : 1 PROC : db2stmm (WEBEDIDB) INSTANCE: db2inst1 NODE : 000 DB : WEBEDIDB APPHDL : 0-8 APPID: *LOCAL.db2inst1.080229022428 AUTHID : DB2INST1 FUNCTION: DB2 UDB, Self tuning memory...
1
2707
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 Rsp:1; unsigned int reserved:3; } Control_t;
0
10308
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10143
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8964
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5507
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2870
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.