473,797 Members | 3,204 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Getting Out of memory exception even when the memory is not full

Hi,
I am ruuning to out of memory exception , My system has RAM of 4 GB
and virtual memory paging size set to 4GB .When I check the memory
occupied by the process during the exception , it is less ( around 500
MB and peak Memory usage 800MB , even the total memory of the system
is not high . what are passing use cases where the system leads to out
of memory exception ?
I am using two process for the program and the out of memory occuring
in the second process.

Thanks in Advance

Regards
Aravind

Aug 3 '05 #1
7 18935
Aravind,

How do you know that the memory is not completly used.

Cor
Aug 3 '05 #2
Aravind <ar************ *@gmail.com> wrote:
I am ruuning to out of memory exception , My system has RAM of 4 GB
and virtual memory paging size set to 4GB .When I check the memory
occupied by the process during the exception , it is less ( around 500
MB and peak Memory usage 800MB , even the total memory of the system
is not high . what are passing use cases where the system leads to out
of memory exception ?
I am using two process for the program and the out of memory occuring
in the second process.


There are other situations in which you can get an
OutOfMemoryExce ption, I believe - if you "leak" a lot of Windows
handles, for instance, I think you can get that exception. The most
common cause of this in my experience is using large numbers of images
and not disposing of them. Could that be the problem?

--
Jon Skeet - <sk***@pobox.co m>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Aug 3 '05 #3
Jon,

In my opinion it is easier to get an Out of memory exception with code like
beneath.

\\\\
Public Class Main
Public Shared Sub main()
Dim a As New Main
End Sub
Public Sub New()
Dim c As New ArrayList
For i As Integer = 0 To 999999999
c.Add(c)
Next
Dim b As New Main
End Sub
End Class
///

I made this because that I was curious what the taskmanager would do with
this.

Cor
Aug 3 '05 #4
Aravind,
Another way to run out of memory without using much is to create too
many threads. Since each thread normally reserves 1 meg of memory space,
creating 2000 threads will reserve all of available user memory while
actually only consuming about 10 Meg.
Bob Milton

"Aravind" <ar************ *@gmail.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Hi,
I am ruuning to out of memory exception , My system has RAM of 4 GB
and virtual memory paging size set to 4GB .When I check the memory
occupied by the process during the exception , it is less ( around 500
MB and peak Memory usage 800MB , even the total memory of the system
is not high . what are passing use cases where the system leads to out
of memory exception ?
I am using two process for the program and the out of memory occuring
in the second process.

Thanks in Advance

Regards
Aravind

Aug 3 '05 #5
Hi Cor,

When I check the memory occupied by the task manager , the process is
not occupying huge memory ( around 500
MB and peak Memory usage 800MB ) for my RAM 4GB . Hence I had the
confusion.

When the process is reaching out of memory it should show the memory
usage of the process in the task manager right ?

Regards
Aravind.
*** Sent via Developersdex http://www.developersdex.com ***
Aug 3 '05 #6
Please don't multipost, I replied in the Csharp NG.

Willy.

"Aravind" <ar************ *@gmail.com> wrote in message
news:11******** *************@z 14g2000cwz.goog legroups.com...
Hi,
I am ruuning to out of memory exception , My system has RAM of 4 GB
and virtual memory paging size set to 4GB .When I check the memory
occupied by the process during the exception , it is less ( around 500
MB and peak Memory usage 800MB , even the total memory of the system
is not high . what are passing use cases where the system leads to out
of memory exception ?
I am using two process for the program and the out of memory occuring
in the second process.

Thanks in Advance

Regards
Aravind

Aug 3 '05 #7
> When I check the memory occupied by the task manager , the process is
not occupying huge memory ( around 500
MB and peak Memory usage 800MB ) for my RAM 4GB . Hence I had the
confusion.

When the process is reaching out of memory it should show the memory
usage of the process in the task manager right ?

No,

However I saw that Willy has answered you in the Csharp newsgroup. He is a
kind of the specialist in this kind of questions.

In addition to him please don't multipost, crossposting to the dotnet
newsgroups is if done well not a problem at all.

Cor
Aug 4 '05 #8

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

Similar topics

2
1865
by: Aravind | last post by:
Hi, I am ruuning to out of memory exception , My system has RAM of 4 GB and virtual memory paging size set to 4GB .When I check the memory occupied by the process during the exception , it is less ( around 500 MB and peak Memory usage 800MB , even the total memory of the system is not high . what are passing use cases where the system leads to out of memory exception ? I am using two process for the program and the out of memory occuring...
25
2390
by: Zeng | last post by:
I finally narrowed down my code to this situation, quite a few (not all) of my CMyClass objects got hold up after each run of this function via the simple webpage that shows NumberEd editbox. My memory profile shows that those instances survive 3 rounds of GC collections - it's not what I expected. In my real code, CMyClass occupies big amount of memory and they all share one stance of another class that I don't have enough memory hold...
2
2299
by: Liverpool fan | last post by:
I have a VB .NET windows application that is throwing an intermittent 'out of memory' error. Here is the call stack. Out of memory. at System.Drawing.Graphics.FromHdcInternal(IntPtr hdc) at System.Windows.Forms.DibGraphicsBufferManager.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height) at System.Windows.Forms.DibGraphicsBufferManager.AllocBuffer(Graphics
81
4578
by: Peter Olcott | last post by:
It looks like System::Collections::Generic.List throws and OUT_OF_MEMORY exception whenever memory allocated exceeds 256 MB. I have 1024 MB on my system so I am not even out of physical RAM, much less virtual memory. Are other people experiencing this same problem?
12
2572
by: Premal | last post by:
Hi, I tried to make delete operator private for my class. Strangely it is giving me error if I compile that code in VC++.NET. But it compiles successfully on VC++6.o. Can anybody give me inputs about it. I wanted that on my class delete should not work. Object pointer should be deleted using my function only which is taking care of reference count for particular class. Thanx in advance for your inputs.
4
5807
by: Daniel | last post by:
is there some per-process-limit on memory in .net processes? is there any way to increase it? i keep getting System.OutOfMemoryException when my box has 8 gigs of unused memory.
2
4608
by: Scott | last post by:
I'm debugging an xmlrpc client/server application. Often when an exception occurs in the server, I receive only a very short error message on the client. For example: xmlrpclib.Fault: <Fault 1: "<type 'exceptions.AssertionError'>:"> Presumably this is because xmlrpclib on the server is catching the exception, and only sending the exception name to the client, not the server's stack trace.
0
10469
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
10246
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
9066
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
7560
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
6803
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
5459
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...
1
4135
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3750
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2934
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.