Results 1 to 10 of 10

Thread: How much memory your .Net application uses

  1. #1

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704

    How much memory your .Net application uses

    I've got between 9-12 megs for a small app... granted, I've imported a bunch of classes... but wow...

  2. #2
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    My biggest app generates a decent size dataset with about 10 tables, and is probably horribly memory-inefficient. It bloats up to 20mb at runtime. I really need to put that project on a diet

  3. #3
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    that's too mcuh guys . You remember how VB6 Projs were consuming not more than 2 mb . Well , the question that ask itself is : Why ? Is the .NET Framework involved in this issue ?

  4. #4
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    In my case, it's probably because I'm doing evil things involving very large numbers of Split operations manipulating lines of comma-delimited text. I haven't even started on rewriting that app, I plan to get the data reasonably how I want it to look in a dataset and then write it out to xml and never use Split again if I can help it. Blame the programmer here.

  5. #5

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Well, is it too much?

    If you make a simple Windows form application that just displays "hi there" when you click a button, that will consume 9 megs at runtime... so yes, I imagine the framework is involved in the issue... and it appears that 2 window forms .net apps will consume 18-24megs....

    A simple .Net console app consumes 5 megs....
    Last edited by nemaroller; Apr 27th, 2003 at 10:45 AM.

  6. #6
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    absolutely it's too much . That's all because CLR .Imagine if you're working with GDI+ and DX how much memory do you think you would end up with ! that sucks man !

  7. #7

    Thread Starter
    I wonder how many charact
    Join Date
    Feb 2001
    Location
    Savage, MN, USA
    Posts
    3,704
    Right, coming from C++ apps, that seems entirely bloated, but new computers are shipping with 512megs of ram....

    I mean, could you imagine running VB6 on a 386?

  8. #8
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The thing you have to remember is that the garbage collector is deisgned to clean as needed. SO if you have a large amount of ram then it will be cleaning less frequently and your program will seem bloated. In other words the amount of memory your program could consume is probably relative to how much you have or are using. Also things should run faster if they are already in memory and this should create a sort of caching effect, although I'm not sure on that.

  9. #9
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    I agree , this makes it acceptable pain Ed . So the more your program is running the less memory it consumes because GC .

  10. #10
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Minimize an app and see how much memory it consumes then. I have a small app that starts out at 9mb (which does seem like a lot, yes) but when I minimize it it trims down to 400k or so, then when restored it gets up to about 2mb and stays there. I would guess that when a .NET program is initially run, the managed execution process leaves some trash behind. Take a look at:
    ms-help://MS.VSCC/MS.MSDNVS/cpguide/html/cpconmanagedexecution.htm

    After all kind of a lot of things are being done to make a "Hello World" application pop out. I don't think MS tried to bill .NET as a more memory-efficient development platform than Assembly

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width