473,587 Members | 2,527 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 4016
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 SetProcessWorki ngSetSize

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
3328
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 the reference count reaches zero for all the objects that are no longer used. I also call Dispose as much as possible. Regardless, the memory is...
2
460
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 the app I load some things into memory for global use of the app but I'll use only 2 starting forms to explain the situation) situation 1 start app...
8
15937
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 usage is 14! The same code written as a program that requires you to click on the menu options to fire off the events takes up 4/9mb. I've seen...
13
1509
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 dataset, something, it doesn't matter) the memory used by the application increases. After using it half an hour it grows so big that most of PCs here...
3
2751
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 starts up, even though there is very little on the form, the memory usage displayed in task manager jumps to 24MB. If I minimize the app, usage...
8
4542
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 Thanks
3
3522
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 application consume less memory or at least release the memory when it is done processing a request. It seem like you can be logged in for any amount of...
4
13448
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. Thanks in advance. Emil.
1
4053
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 what I read so far I found that the problem can be connected to P/Invoke and that the places at which this exception is thrown might not reflect the...
0
7920
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...
0
7849
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...
0
8215
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. ...
0
8347
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...
1
7973
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
8220
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...
1
5718
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...
0
3844
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...
0
3879
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.