Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Runtime memory consumption

Status
Not open for further replies.

abcfantasy

Programmer
Jun 3, 2006
110
DK
Hello,
I'm new to c# and just create a small application, that is a quick calculator. When I run the program, Windows Task Manager shows that the program is using around 8mb of memory.

Is this normal or am I doing something wrong? I used to program in delphi before, and a small app would use about 2mb of memory.

ABC -
 
It is because of the overhead of the .net framework. As you might start other apps that use the framework, that number for your app will usually actually lessen. But when it first initializes, even for one small app, you get a large initial hit.

The overhead is really what I've found to be the biggest knock on .net applications. For instance, in a business of software forum on another site, many of the software development companies represented shy away from using .net for that reason.

.Net does have a place, though, especially in the business world where you have a lot of control over the PCs and what is installed on them or in a server environment where you have total control.

As an additional point, .net forces you to compile and distribute your applications with the full run-time. Microsoft doesn't have a linker for .net, though they are available on the internet.

----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
Ah i see. Thanks for the info.

But it's bad news for me i think. The programs will not run on other computers which do not have the .net framework.

I'm still 17 and I create small programs or games for practice (and as a hobby) and pass on to my friends to use or play. I'm sure most of them don't have the .net framework.

At this stage should I stop learning this language?

ABC -
 
Anyone can download the .net framework, you can even include the redistributable package in your application.

C# is my favorite language and even if a small app takes up 8 mb - who cares? Most people have Gigs of memory now!

Keep playing with C# and if you're doing games, hook into the Direct3D stuff. You will find it fun.
 
If you are 17 play with .NET, by the time you will be 27, you will be a God in the .NET heaven enjoying making 6 figures salary (US dollars). Don’t, ever, make all of that memory usage nonsense stops you. Companies who adapted a wait and see style are crying out loud now regretting what they did and ask God for forgiveness and for skilled developers.

No one want to stay in the business of making Enterprise software will or can afford to stay away from .NET any more, and even whoever will decide to stay away will eventually get out of the game.

If you are not developing Embedded Systems, Device Drivers, Mathematical Libraries, etc (In Short, any application that can’t afford that kind of .NET luxury), this platform is the best investment you will ever make in your life. If you hear otherwise from any Anti-Microsoft person, go to Monster.COM or even Microsoft.COM and search for a job using a keyword C#, you will see that I gave you an honest to God advice.


Walid Magd (MCP)

The primary challenge of every software development team is to engineer the illusion of simplicity in the face of essential complexity.
-Grady Booch
 
Thank you all for your feedback. I think I'll continue learning this language. Anyways, it will never do me any harm right? :)

Thanks again for your quick responses

ABC -
 
I don't want it to seem like I was knocking .net or C#. I make a VERY good living as a C# developer and can attest firsthand how hot the language is among hiring companies. I almost could name my own salary and bidding wars broke out during my last two job searches.

By all means, continue to learn C#. I did about 3 and a half years ago and have never been sorry.

----------------------------------------

TWljcm8kb2Z0J3MgIzEgRmFuIQ==
 
I make a pretty crappy living as a C# developer but money doesn't count for much to me. I just love the language. Someone once told me to learn spanish and instead I learned C# :)

And Walid - Device Drivers actually work quite well using C#. You can download the DDK from MS. I believe ATI used .net for their control panels to drive their hardware.

2 Years will take you a long way in this language. Enjoy!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top