473,809 Members | 2,724 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

excessive memory usage ?

Writing with Visual Basic.net

Even the smallest piece of code with no form and no references and the
debugging code removed still seems to use around 6000 k
what is .net doing to consume that amount of memory ?
how can i stop this from happening ?
I'm trying to create a small compact efficient piece of code that will be
constantly backgound running and people just wont take it seriously if its
using that amount of precious memory on their systems.

Thanx in advance
_______________ _______________ _______

Matthew Purves , (Deadly_M)
www.DeadlyM.com
Nov 20 '05 #1
6 1128
Unfortunaltey I agree with you and have noticed too that the memory
usage of a .net app is sickening. I have not been able to resolve this
but my app which basically does nothing except shows an mdi form
arrangement with some descent looking background images takes around 20
megs of ram. On top of that if I access my database it jumps up to
about 26 megs (and im not using datasets just datareaders) and when I
close it never goes back down to 20. I understand garbage collection
but how is this a benefit if all .net apps just eat memory. Than
garbage collection has to run more often defeating its own purpose.
Microsoft has always been good at eating RAM but this is obsurd. If
anyone knows why this happens and how to stop it I would be very
interested in knowing?

-Ivan

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 20 '05 #2
* "Deadly_M" <NO********@REA Ldeadlym.com> scripsit:
Even the smallest piece of code with no form and no references and the
debugging code removed still seems to use around 6000 k
That's "normal".
what is .net doing to consume that amount of memory ?
The application will load some libraries and it will need the CLR to be
executed.
how can i stop this from happening ?


Use pure C.

SCNR

--
Herfried K. Wagner [MVP]
<http://www.mvps.org/dotnet>
Nov 20 '05 #3
Cor
Hi Deadly,

No other answer than Herfried,

Just curious are you talking about a handheld?

In other circumstanses 6K cost less than a hamburger.

Cor
Nov 20 '05 #4
No not for handheld ,
but if its going to be a permanent background task it needs to be very
compact , agree ?
Thanx

"Cor" <no*@non.com> wrote in message
news:%2******** ********@TK2MSF TNGP10.phx.gbl. ..
Hi Deadly,

No other answer than Herfried,

Just curious are you talking about a handheld?

In other circumstanses 6K cost less than a hamburger.

Cor

Nov 20 '05 #5
Cor
Hi Deadly,

I agree an I disagree, depends on the application.
In my opinion VB.net is not the language for what you describe.
I thought that for small compact background programs C++ unmanaged code is
still the solution.

But I can be wrong and has somebody a solution for you in VB.net

Cor
Nov 20 '05 #6
My PC time is very limited, just a hobby and I don't have time to practice
other languages.
Maybe I'll do some night classes sometime and learn some new stuff but until
then I guess I'm stuck with VB for now.

"Cor" <no*@non.com> wrote in message
news:%2******** ********@TK2MSF TNGP11.phx.gbl. ..
Hi Deadly,

I agree an I disagree, depends on the application.
In my opinion VB.net is not the language for what you describe.
I thought that for small compact background programs C++ unmanaged code is
still the solution.

But I can be wrong and has somebody a solution for you in VB.net

Cor

Nov 20 '05 #7

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

Similar topics

5
6094
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. ...
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 with form 1 (72mb memory usage), show form 2 and hide form 1 (89 mb memory usage
6
3279
by: Tom | last post by:
We have a VERY simple .NET C# Form Application, that has about a 23MB Memory Footprint. It starts a window runs a process and does a regular expression. I have done a GC.Collect to make sure that, no memory is lying around. GC reports only 84k of allocations. Starting 5-10 of this apps is going to start taking a considerable amount of memory. Is there a way to reduce this? Tom
2
422
by: Jarvis | last post by:
I've made a testing program to test the memory usage of some Data Forms. I create a MDI parent form with one single MDI child form, which is a Data Form generated by .NET Data Form Wizard. To test the stuff, I keep to open that child data form for about 10 times. the memory usage shown in GC and task manager both increase. Then I close all those forms. and perform GC collect. The memory usage shown in GC falls, however, the memory...
3
4155
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...
20
4252
by: Philip Carnstam | last post by:
How come .Net applications use so much memory? Every application I compile uses at least 10 MB of memory, even the ones consisting of only a form and nothing else. If I minimize them though the memory usage drops to a couple hundred KB. Why? Is there anything I should to to prevent this? I have compiled in release and deactivated all forms of debugging, I think! Thanks, Philip
6
8122
by: nekiv90 | last post by:
Greetings, Could someone confirm if the following reasoning is correct (64-bit DB2 on 64-bit AIX v5.3): ================================================================== For each connection to DB2 db, AIX will reserve a 64GB shared memory segment for buffer caching. So if there are connections to 3 different DBs, AIX will reserve a
4
2310
by: kimiraikkonen | last post by:
Hi, On my system which is 2.4GHZ P4 CPU, 1GB memory + 64MB DDR graphic card, if i create a simple picturebox docked on a form sized about 500x350 or less or more, doesn't matter, and also if i place a normal sized picture on the control, while dragging the form having with picturebox + image, it costs about %90-%100 CPU while dragging form around the screen. And screen is shown as very noticeably sluttering and distorted etc. Note that i...
1
2051
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...
0
9721
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
9601
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
10635
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...
1
10378
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 most users, this new feature is actually very convenient. If you want to control the update process,...
0
9198
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...
0
6881
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5550
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
5687
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
3013
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.