473,789 Members | 2,679 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

A weird memory problem / C# Express BETA

I'm using C#Express Beta and the framework 2.0.

I recently realized that my application, when starting has a workingset
peak of ~128 MegaB. I startet wondering a bit because the application
didn't yet do anything really usefull.

So I fired up the IDE, created an empty WinForms project and compiled a
release build. Please note that I have not added any extra code! Here is
what I have figured out:

1. On launching the resulting exe, the TaskManager shows a workingset of
~70 MegaB.

2. When I minimize the MainForm window the workingset shrinks to ~400 KiloB.

3. Maximizing the window again results in a workingset of ~1460 KiloB,
which I could live with.

Does anyone have an idea how to go on about this?

BTW.: Is there a way to monitor in detail what and where and how your
application is using up the memory? I have a monitor to get information
as of what modules are loaded, but is ther a way to figure out of what
classes or resources are taking up the space?

Any pointers are highly appreceated.

Thanks in advance,

Matthias
Nov 16 '05 #1
2 1313
Please post VS2005 Beta and Framework v2.0 beta related questions to the
private Whidbey NG's.
http://communities.microsoft.com/new...y&slcid=us,
you can also report issues to:

http://lab.msdn.microsoft.com/productfeedback/

Willy.

"Matthias S." <po*****@emvoid SPAMTRAP.de> wrote in message
news:e0******** ******@TK2MSFTN GP10.phx.gbl...
I'm using C#Express Beta and the framework 2.0.

I recently realized that my application, when starting has a workingset
peak of ~128 MegaB. I startet wondering a bit because the application
didn't yet do anything really usefull.

So I fired up the IDE, created an empty WinForms project and compiled a
release build. Please note that I have not added any extra code! Here is
what I have figured out:

1. On launching the resulting exe, the TaskManager shows a workingset of
~70 MegaB.

2. When I minimize the MainForm window the workingset shrinks to ~400
KiloB.

3. Maximizing the window again results in a workingset of ~1460 KiloB,
which I could live with.

Does anyone have an idea how to go on about this?

BTW.: Is there a way to monitor in detail what and where and how your
application is using up the memory? I have a monitor to get information as
of what modules are loaded, but is ther a way to figure out of what
classes or resources are taking up the space?

Any pointers are highly appreceated.

Thanks in advance,

Matthias

Nov 16 '05 #2
I assume you are looking at the memory consumption in task manager. To me this is one of the most useless measures of memory there is as it doesn't actually tell you the amount of memory the application is using it simply tells you the working set. Minimising an application trims the working set (you'll see the same behavior in Word for example) and so when you remaximize you see the actual figures of memory consumption (more or less). You can do the same in your application to make things "look" better by using P/Invoke to

SetProcessWorki ngSetSize(hProc , -1, -1); //hproc is the process handle which you can get by P/Invoking to GetCurrentProce ss

But you aren't really changing anything (in fact you'll probably slow your application down as it will have to page a bunch of stuff from disk)

Regards

Richard Blewett - DevelopMentor
http://staff.develop.com/richardb/weblog

nntp://news.microsoft. com/microsoft.publi c.dotnet.langua ges.csharp/<e0************ **@TK2MSFTNGP10 .phx.gbl>

I'm using C#Express Beta and the framework 2.0.

I recently realized that my application, when starting has a workingset
peak of ~128 MegaB. I startet wondering a bit because the application
didn't yet do anything really usefull.

So I fired up the IDE, created an empty WinForms project and compiled a
release build. Please note that I have not added any extra code! Here is
what I have figured out:

1. On launching the resulting exe, the TaskManager shows a workingset of
~70 MegaB.

2. When I minimize the MainForm window the workingset shrinks to ~400 KiloB.

3. Maximizing the window again results in a workingset of ~1460 KiloB,
which I could live with.

Does anyone have an idea how to go on about this?

BTW.: Is there a way to monitor in detail what and where and how your
application is using up the memory? I have a monitor to get information
as of what modules are loaded, but is ther a way to figure out of what
classes or resources are taking up the space?

Any pointers are highly appreceated.

Thanks in advance,

Matthias

---
Incoming mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.771 / Virus Database: 518 - Release Date: 28/09/2004

[microsoft.publi c.dotnet.langua ges.csharp]
Nov 16 '05 #3

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

Similar topics

48
3734
by: ik | last post by:
ERROR after uninstalling SQL Server 2005 Express I get this message, SQLDMO has not been registered. Please re-run your setupand contact your system administrator. GREAT!!! ReInstalled SQL SERVER 2000 after playing around with SQL Server 2005...
2
387
by: Bootstrap Bill | last post by:
A new Google group has been formed for the purpose of discussing the new Visual Studio Express products. http://groups-beta.google.com/group/Visual-Studio-Express The products are currently in beta testing and include Visual Basic 2005 Express, Visual C# 2005 Express, Visual C++ 2005 Express, Visual C++ 2005 Express, Visual J# 2005 Express, Visual Web Dev 2005 Express and SQL Server 2005 Express.
4
2182
by: NetIdiot | last post by:
I have had to install and uninstall VS.NET 2005 a couple of times because of some errors. The SQL Server express refuses to install ... and hence I can't most things I want to work on. I even tried installing an evaluation version of SQL 2000. It seems I haven't uninstalled in the right sequnce ... causing all the problems. Help please !!!!
10
1981
by: Bonj | last post by:
Hi I installed .NET 2005 express edition, and am about to unnistall it again because it can't seem to be able to even insert a resource file into a project. Can anyone tell me is this right? Should it be able to? I know it's express edition, and therefore limited functionality, but surely resources are quite fundamental? Also, once it's downloaded, is there any way of getting access to the fully downloaded file incase you want to...
14
1585
by: Chuck | last post by:
I'm trying to install VWD Express Beta 2, but it's telling me that I need to uninstall MSDN Express Library 2005 Beta first. I uninstalled everything using the Add/Remove Programs control panel applet, and the Express Library is not showing up there. I also ran Registry Medic to clean up any registry problems that might have been causing this problem. Any other ideas on how can I resolve this issue? I'd like to get the beta 2...
0
1279
by: Maury | last post by:
I just downloaded .Net Framework Beta2 and Visual Web Developer Express Edition Beta and Visual C# Express Edition. I installed .Net Framework Beta2, then I installed Visual Web Developer Express Edition Beta but the installation failed because the installation package can't find the Beta 2 (?). So I tried to install Visual C# Express Edition and all is ok (it works fine) I tried to reinstall Beta2 and
1
2962
by: Bob | last post by:
Trying to use VBisual web developer express 2005 beta 2. Dragged an accessdatasource to the blank web page. Started to configure. Entered location of an access database. On next page, clicked on Query builder. Got error with "Microsoft Visual Studio" in the title - I am using VWD express 2005 beta 2 although I also have Visual Studio 2003 installed. the text of the error is: Retrieving the com class factory for component w/ clsid...
0
9511
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 synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10408
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
10199
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
9020
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
7529
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
5417
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
5551
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4092
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
3
2909
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.