CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4

Threaded View

  1. #1
    Join Date
    Oct 2009
    Posts
    40

    Questions about memory usage of programs

    Let's say the .exe file of a program is 480 kb.When you run the program,does it use about 480kb of memory?
    Functions use memory,variables use memory,objects use memory...

    For example,I wrote two .cpp files,built exe from them.One of the exe files is very short and it is just 5.120byte.The other is longer and 497.644 byte.
    When I run these exe files ,look at task manager's processes section,the shorter exe file seems using 1.044K (is this in KB) and the longer exe seems using 1.056K.Why is the difference between so small?Also why the shorter exe file seems using 1.044 KB? In it's cpp file there is only one function(main) and it has just one variable.The longer exe file has about 6 functions and has more variables including arrays.


    Also do you know a good webpage which describes how applications use memory?
    Last edited by AwArEnEsS; March 12th, 2013 at 08:57 PM.

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

Featured