473,408 Members | 1,728 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

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 1301
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*****@emvoidSPAMTRAP.de> wrote in message
news: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

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

SetProcessWorkingSetSize(hProc, -1, -1); //hproc is the process handle which you can get by P/Invoking to GetCurrentProcess

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.public.dotnet.languages.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.public.dotnet.languages.csharp]
Nov 16 '05 #3

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

Similar topics

48
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...
2
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...
4
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...
10
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?...
14
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...
0
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...
1
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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
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...
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...

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.