Memory usage.

  • Thread starter Thread starter Twoofakind
  • Start date Start date
T

Twoofakind

How come my 10K compiled exe is using 20000K just to create a window and a
few controls.
Is this to deploy runtime compiling functionality?
 
Yes, thats the working set of memory required to load the .NET Runtime as well as the necessary CLI services that enable .NET Applications to execute.
BUt, these resources are shared accross .NET Applications, so even though the initial application will show a high amount of memory being consumed, the more .NET Applications that you invoke will continue to consume the memory allocated earlier.

Regards,
Saurabh Nandu
 
Saurabh Nandu said:
Yes, thats the working set of memory required to load the .NET Runtime as well as the necessary
CLI services that enable .NET Applications to execute.
True.

BUt, these resources are shared accross .NET Applications, so even though the initial application
will show a high amount of memory being consumed, the more .NET Applications that you invoke
will continue to consume the memory allocated earlier.

Unfortunately, no: All the parts of the framework that come as IL (and thus
have to be JITed) will get JITed for every executable that uses them (I
think even for every app-domain!). For a Windows Forms application, this can
be a lot of space!

Niki
 
I now understand why making drivers with c# isnt portable.

Does anyone know if C++NET enhances this type of design stucture?
 
Drivers are written in C (or C++ if you are brave) using the Device Driver
Development kit, just because driver development is strongly related to
Kernel API's and data structures which are also written in C.
So the point is not being portable, it's just a question of efficiency.

C++ .NET, just like previous versions VC++, doesn't "enhance this" why
should it, they just serve other purposes.
.NET (Framework and languages) is a tool that eases the development of
"general purpose" client and server type application , not system level
components. So there is nothing wrong with the type of "design structure",
you just need to use the right tools for the right job.

Willy.
 
Twoofakind said:
http://samgentile.com/blog/articles/1989.aspx

I came accross this in a google search for c# runtime.

A lot of bluster...but I have no idea what he means by 'learn the CLR' --
why? Were we supposed to 'learn the VB runtime' ?

Learning the .NET assemblies -- yea, I guess -- but those are mostly
retrieved and used and /learned/ as needed.

And as far as what he says about c# -- what bullshit. Yes, you can learn
the basic syntax without a book -- but good design principles? for web
applications, services and so on ?

That requires real knowledge. There are only 26 letters in the alphabet.
Many people can read them in words. Many others can write with them. Very
few are Salinger.
 
Still, Sam Gentile's blog got me thinking.The senior architects where I
work have been telling us more or less the similar thing, why do you want
to use c#, untiol you have a good reason, we'll go on with managed c++, so
I guess they're just being men.
Having said this, I totally disagree that one should know CLR or BCL first,
that's nonsense. One should know the programming and design principles,
understand common design patterns and leave CLR to geeks
 
rux said:
Still, Sam Gentile's blog got me thinking.The senior architects where I
work have been telling us more or less the similar thing, why do you want
to use c#, untiol you have a good reason, we'll go on with managed c++, so
I guess they're just being men.

No, I guess they are just preserving their status as /Senior Architects/
Having said this, I totally disagree that one should know CLR or BCL
first, that's nonsense. One should know the programming and design
principles, understand common design patterns and leave CLR to geeks

See thats the beauty of c# and .NET -- doing OOP in COM+/vc++ was 99%
percent grunt work -- so much so that actually doing the *design* work that
lets you get the benefit of OO never happens.

In c#, the basic implementation is so obvious, that the Programmer becomes a
Designer who can model systems and abstract workflow and so on. So, yes,
I wouldn't spend my time *learning* the CLR or even c# -- but I would spend
my time dreaming about how to design systems using them...
 
Back
Top