473,398 Members | 2,368 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,398 software developers and data experts.

Memory Usage and Minimize Windowstate

Hi!

I have a small ;) application which needs just to load up the Main Form
40MB (there is a IE Instance implementet). After that i managed with own
Memory Managment to need just 10 to 20MB more for the routines.

So i ended with about 60MB at normal state and at working state (running a
routine) with 80 to 90MB - thats relay huge. If a system has just a small
Memory Pool the GC works fine and it needs just 30MBs without any loose in
speed compared to the 90MB Version.

My point is, that if i minimize the app it needs just 2MB which is fine -
but after setting them back to normal state it runs with a max of 20MB
(40MB to max 60MB) less then started and thats what makes me a little bit
confused.

Someone who has a idea how i can simulate this ;) to prevent the lesser
memory usage from the begining?

Maybe some tips in optimizing the Memory usage at a global way! Now it
implement a Dispose Method to each class where i destroy all Constructs and
Vars and at each Method i destroy the Constructs at the end too - or set
them to null or .clear (Hashtable/ArrayList).
Thanx

Matthias
Nov 15 '05 #1
2 4002
Hi Matthias
if i minimize the app it needs just 2MB which is fine -
Someone who has a idea how i can simulate this

at least on Windows 2000+XP this is a feature of the Windows shell,
for all applications, not only for .NET apps.

AFAIK it is just a call to Win32 SetProcessWorkingSetSize

http://support.microsoft.com/?kbid=293215

http://msdn.microsoft.com/library/en...ingsetsize.asp

http://www.google.com/groups?selm=%2...%40tkmsftngp05
Please first understand what happens with this API....
On the other side, try
http://www.gotdotnet.com/Community/U...d-bfd7cb3154ac

http://www.gotdotnet.com/Community/U...6-c72d5104ec74

--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/
Nov 15 '05 #2
Hi Thomas,

thanks for your answer und this links.

I see that there is / was a bug with large Arrays i use, but with mem
profilers it shows me that i just use 5MB to 6MB of Heap Data - where the
rest is gone may the GUI ... all Cleanup is working nice and the Heap Data
moves back to the standard size after using a larger amount and free them
after that.

The point is if i use the Application and it need 90MB of Memory, than
minimize it (understand it now) and set it back to normal state and work
the same steps i did before it just needs a max of 60MB ! And thats what
makes me a little bit confused, how can a application use 90MB and after
Minimizing it just 30MB less (by doing the same work)?

Matthias
Nov 15 '05 #3

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

Similar topics

2
by: Mike Peretz | last post by:
I am trying to optimize my C# program, but no matter what I try the application keeps eating memory. I verified all the references and even got special software to count references. I made sure all...
2
by: tomvr | last post by:
Hello I have noticed some 'weird' memory usage in a vb.net windows app The situation is as follows I have an app (heavy on images) with 2 forms (actually there are more forms and on starting...
8
by: Greg Merideth | last post by:
I've written a basic windows service to provide some helper xml functions for my web methods and even thou the service is only about 1k lines long with 1 timer, its mem usage is 10m and its vm mem...
13
by: Nikolay Petrov | last post by:
I've got this issue: When I start my application it takes a lot of memory. I guess this is caused by CLR. That's fine. But every time the app performs an action (open new form, load data in...
3
by: bamapookie | last post by:
I am new to VB, but not new to programming. I am using VB.Net 2003 and I have written a small app to monitor several running processes and everything is fine except the memory usage. When the app...
8
by: Avi G | last post by:
Hi, i've created an application and i want it to be minimized to the sys tray, how i do it? if you can direct me step by step even with create a small application and put it in the sys tray ...
3
by: san | last post by:
we cannot stop the application from increasingly use memory. The CRM Worker process will continually consume memory but not release it back to the system. Please research into how to make the...
4
by: EmilH | last post by:
Hi, Can anybody show me how to minimize/maximize a window dynamically? I placed buttons for each of these commands and want to place the code which will minimize and maximize the window. ...
1
by: Marc Bartsch | last post by:
Hi, My C# app throws the following exception: System.AccessViolationException: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. From...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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:
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
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
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,...

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.