473,609 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Memory usage problem

Hello!
I have windows forms app (C# 2.0) which take about 60MB ram. I noticed
when I minimize it then memory usage drops to about 4MB. When I
maximize it then memory usage is about 16MB and then it is constant.
What is the reason of such behaviour ?

Regards.
Sebastian

Jan 10 '07 #1
3 1230
sebapi wrote:
I have windows forms app (C# 2.0) which take about 60MB ram. I noticed
when I minimize it then memory usage drops to about 4MB. When I
maximize it then memory usage is about 16MB and then it is constant.
What is the reason of such behaviour ?
The number you're looking at is almost certainly not memory usage, but
working set. Read a book like Microsoft Windows Internals if you want to
know all the details.

If not, don't worry about it, but do keep this in mind: memory that
isn't being used in some way is being wasted (literally), and
applications that use GC are more efficient (in amortized collection
time) the more memory they use, therefore using more memory means faster
applications.

-- Barry

--
http://barrkel.blogspot.com/
Jan 10 '07 #2
"sebapi" <se****@op.plwr ote:
I have windows forms app (C# 2.0) which take about 60MB ram. I noticed
when I minimize it then memory usage drops to about 4MB. When I
maximize it then memory usage is about 16MB and then it is constant.
What is the reason of such behaviour ?
The answer is here:
http://www.coversant.net/dotnetnuke/...d=88&EntryID=4

--
Chris Mullins, MCSD.NET, MCPD:Enterprise , MVP C#
http://www.coversant.net/blogs/cmullins
Jan 10 '07 #3
More memory usage doesn't always mean faster applications. What it means is
that the GC doesn't have to work as often which should speed up your
application to a point. However, if your working set exceeds the available
physical memory, your application will start to slow down as Windows swaps
parts of it to disk.

Mike Ober.

"Barry Kelly" <ba***********@ gmail.comwrote in message
news:9m******** *************** *********@4ax.c om...
sebapi wrote:
>I have windows forms app (C# 2.0) which take about 60MB ram. I noticed
when I minimize it then memory usage drops to about 4MB. When I
maximize it then memory usage is about 16MB and then it is constant.
What is the reason of such behaviour ?

The number you're looking at is almost certainly not memory usage, but
working set. Read a book like Microsoft Windows Internals if you want to
know all the details.

If not, don't worry about it, but do keep this in mind: memory that
isn't being used in some way is being wasted (literally), and
applications that use GC are more efficient (in amortized collection
time) the more memory they use, therefore using more memory means faster
applications.

-- Barry

--
http://barrkel.blogspot.com/


Jan 11 '07 #4

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

Similar topics

5
6069
by: Justice | last post by:
Currently I'm doing some experimenting with the XMLHTTP object in Javascript. Now, the XMLHttp object is asynchronous (at least in this case), and the following code causes a significant memory loss even though I seem to be allocaitng everything; help would be *vastly* appreciated. What am I doing wrong here? I thought I was doing everything correctly (setting things to null, for example) but none of the memory seems to get replaced. ...
3
4132
by: Ian Taite | last post by:
Hello, I'm exploring why one of my C# .NET apps has "high" memory usage, and whether I can reduce the memory usage. I have an app that wakes up and processes text files into a database periodically. What happens, is that the app reads the contents of a text file line by line into an ArrayList. Each element of the ArrayList is a string representing a record from the file. The ArrayList is then processed, and the arraylist goes out of...
7
5183
by: George Gre | last post by:
Hi, I wrote a c# programme that listens to incoming TCP requests and services them. This programme is meant to be running as long as the server its installed on is running. So we assume for ever(!). My problem is that I have it running for 2 days now on my pc (win2Ksp3 P4 2GHz,512MB Ram - framework v1.0.3705) and the taskmanager reports that this process takes 97MB ram/130 VMemory and it looks that its eating up more ram(!!). To help...
7
7167
by: Clement | last post by:
hi, i have an asp.net site and is using SQL Server 2k. i realize the aspnet_wp.exe memory usage keep growing and i will receive an error for the pages that call the sql connection. others page with no sql connection is fined. At the time when i encounter the error, i check the memory usage for aspnet_wp.exe = 60000kb sqlmangr.exe = 40000kb
7
2428
by: Rich Denis | last post by:
Hello, I have been trying to solve a mysterious memory leak problem and was hoping that you could help me out on my stuck point. First a bit of background. We have two app servers in an app center cluster that are each running a number of web applications. For some reason one of the boxes' asp_wp process keeps recylcing on us. It seems that the memory just grows and grows and then recycles on us. I cam across and have read the...
4
3419
by: Hermann Maier | last post by:
hi, i need to find out the memory usage of a specific function that i use in my program. this function does some recursive calculations and i want my program to display the amount of memory the function used to calculate a specific value. thx
9
4205
by: jeungster | last post by:
Hello, I'm trying to track down a memory issue with a C++ application that I'm working on: In a nutshell, the resident memory usage of my program continues to grow as the program runs. It starts off at a nice 4% of memory, then slowly grows up to 50% and beyond. This translates to around 2 gigs of physical memory, and that's really way more memory than this program should be taking up.
17
8465
by: frederic.pica | last post by:
Greets, I've some troubles getting my memory freed by python, how can I force it to release the memory ? I've tried del and gc.collect() with no success. Here is a code sample, parsing an XML file under linux python 2.4 (same problem with windows 2.5, tried with the first example) : #Python interpreter memory usage : 1.1 Mb private, 1.4 Mb shared #Using http://www.pixelbeat.org/scripts/ps_mem.py to get memory information
1
2033
by: Jean-Paul Calderone | last post by:
On Tue, 22 Apr 2008 14:54:37 -0700 (PDT), yzghan@gmail.com wrote: The test doesn't demonstrate any leaks. It does demonstrate that memory usage can remain at or near peak memory usage even after the objects for which that memory was allocated are no longer live in the process. This is only a leak if peak memory goes up again each time you create any new objects. Try repeated allocations of a large dictionary and observe how memory...
5
3139
by: Ian Boyd | last post by:
Customer is running a load test against a websphere application that uses DB2. While the load test is running the memory usage of DB2 climbs from x up to y. When the load test ends, the memory usage of DB2 returns to x. However, sometimes after running the load test the memory usage does not drop down to x right away; sometimes it takes a few hours. This "problem" exists with their current live version of the software, and the version we...
0
8115
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
8053
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
8557
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
8380
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
6983
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
6047
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
4066
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2519
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
0
1374
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.