473,657 Members | 2,800 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Reducing .NET CLR reserved memory (may cause system to hang) - how?

When starting a (1st) .NET application the CLR seems to allocate a
very large (100s of MB, continuous AFAIK) virtual memory, as evident
by the process VM size of even a toy app. The CLR also seems to
reserve about 32MB of memory, as seen by the "# Total Reserved Bytes"
performance counter. I take this to mean that 32MB of the allocated VM
are "locked down" in RAM, even if the managed memory needed initially
by the application (reflected in the "# Total Committed Bytes"
performance counter) is much smaller. Can this be changed?

The reason I ask is I noticed that if I reduce the physical memory on
my XP (using /burnmemory boot.ini switch) our application starts and
quickly hangs the machine (must press the start button to shutdown,
then restart). At this stage the application only takes about 16MB of
phsical memory (the "Private Bytes" performance counter, and similar
working set), out of which only 2.5MB is managed (I assume much of the
unmanaged memory is due to EXE + DLLs, including the CLR). I suspect
the hang may be due to the additional 32MB (well, minus 2.5MB counted
above) reserved by the CLR (I should note my 256MB XP hangs only if
you start the application soon after reboot; aparently XP hasn't
collected enough memory yet, as seen in the Available Memory in the
Task Manager performance tab).

Is there some way to reduce this value and make the CLR start with
less? Anyone knows if this value is dependent on RAM, #CPUs, OS
version,...? (I read there are different GC engines for workstation
and server, mscorwks.dll and mscorsvr.dll). Does the .NET framework
have any related configuration settings or runtime parameters?

Thanks,

-- Shaul Dar (Please cc sh****@medcon.c om)
Jul 21 '05 #1
0 1675

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

Similar topics

2
2188
by: Aravind | last post by:
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...
7
4966
by: Jon Trickey | last post by:
We migrated to 8.1 from 7.2 this weekend. Everything ran ok over the weekend, but we have a light user load then (about 200 users.) Today when we had close to 600 users connecting and running applications, the db2syscs.exe process started gobbling up memory until it hit about 1.7 gigs (which seems to be the limit from what I've read) then it started crapping out.. We have shrunk the buffer pools to much lower that they used to be in 7,...
30
3721
by: jimjim | last post by:
Hello, This is a simple question for you all, I guess . int main(){ double *g= new double; *g = 9; delete g; cout<< sizeof(g)<<" "<<sizeof(double)<<" "<<sizeof(*g)<<" "<<*g<<" "<<endl; *g = 111; cout<< sizeof(g)<<" "<<sizeof(double)<<" "<<sizeof(*g)<<" "<<*g<<" "<<endl;
4
2807
by: hazz | last post by:
given namespace WindowsService1 { public class Service1 : System.ServiceProcess.ServiceBase......... private void timer1_Elapsed(object sender, System.Timers.ElapsedEventArgs e) { ArrayList myAL = new ArrayList(); CustomClass objCont = new ControllerClass; CustomClass objInfo = new InfoClass;
0
398
by: Shaul Dar | last post by:
When starting a (1st) .NET application the CLR seems to allocate a very large (100s of MB, continuous AFAIK) virtual memory, as evident by the process VM size of even a toy app. The CLR also seems to reserve about 32MB of memory, as seen by the "# Total Reserved Bytes" performance counter. I take this to mean that 32MB of the allocated VM are "locked down" in RAM, even if the managed memory needed initially by the application (reflected in...
8
2046
by: Lauren the Ravishing | last post by:
Hi, In ASP, is it absolutely necessary to set an object to Nothing after being used? set myObj = server.createObject("myDLL.myClass") call myObj.useClass set myObj = Nothing <--- can I omit this? I'm dealing with a large number of files with nested includes. There
6
3946
by: Jakub Cermak | last post by:
Hi all, how can I reduce reserved memory for my process? Because according to ProcessExporer (and GC.GetTotalMemory() and taskmanager) I use about 5-6MB and reserved memory is nearly 70MB. I don't need such amount of memory, after start I nearly don't need to allocate more memory. -- Best regards, Jakub Cermak
39
2561
by: Gilles Ganault | last post by:
Hello, I'm no LAMP expert, and a friend of mine is running a site which is a bit overloaded. Before upgrading, he'd like to make sure there's no easy way to improve efficiency. A couple of things: - MySQL : as much as possible, he keeps query results in RAM, but apparently, each is session-specific, which means that results can't be shared with other users.
22
9332
by: Peter | last post by:
I am using VS2008. I have a Windows Service application which creates Crystal Reports. This is a multi theaded application which can run several reports at one time. My problem - there is a memory leak someplace. I can not detect the memory leak by running several reports by hand, but when I run tha app as a servrice and process few hundred reports there is significant memory leak. The application can consume over 1GB of memory where it...
0
8403
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 usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8737
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
8610
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7345
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
6174
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
5636
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
4168
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...
2
1967
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
2
1730
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.