473,473 Members | 2,160 Online
Bytes | Software Development & Data Engineering Community
Create 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.com)
Jul 21 '05 #1
0 1641

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

Similar topics

2
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...
7
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...
30
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 =...
4
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...
0
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...
8
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...
6
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...
39
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...
22
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...
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
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...
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
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...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.