473,569 Members | 2,557 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 18914
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
1856
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...
25
2355
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...
2
2290
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...
81
4512
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
2549
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...
4
5789
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
4591
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...
0
7700
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7614
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
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. ...
0
8125
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...
0
6284
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...
1
5513
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...
0
3653
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...
1
1221
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
938
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...

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.