Thread: What is so much memory needed for

  1. #1
    Registered User pronecracker's Avatar
    Join Date
    Oct 2006
    Location
    netherlands
    Posts
    158

    Question What is so much memory needed for

    Task Manager indicates my program uses 1.834 kB of memory. I'm sure I haven't allocated even half that much. Why does my program use over 1 MB? I find that pretty much.
    Don't call me stupid.

  2. #2
    Registered User
    Join Date
    Nov 2005
    Posts
    673
    1.834 or 1,834. Also, are you running debug or Release?

  3. #3
    Registered User pronecracker's Avatar
    Join Date
    Oct 2006
    Location
    netherlands
    Posts
    158
    As the dot takes two pixels, I believe it's a comma.
    This time it's 1,376 kB.
    This build does not have debug information. (i am using Dev, not VC)
    Last edited by pronecracker; 05-27-2007 at 04:01 AM.

  4. #4
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Most likely overhead from Windows and/or any libraries you are using.

  5. #5
    Registered User pronecracker's Avatar
    Join Date
    Oct 2006
    Location
    netherlands
    Posts
    158
    Console projects use around 900 kB.
    I guess I shouldn't worry about it.
    Don't call me stupid.

  6. #6
    "Why use dynamic memory?"
    Join Date
    Aug 2006
    Posts
    186
    it's the same for me, if I run a C++ app, without any memory allocation, the app uses :
    1,484

    I dont know why :s
    "C makes it easy to shoot yourself in the foot; C++ makes it harder, but when you do, it blows away your whole leg."-Bjarne Stroustrup
    Nearing the end of finishing my 2D card game! I have to work on its 'manifesto' though <_<

  7. #7
    Registered User Frobozz's Avatar
    Join Date
    Dec 2002
    Posts
    546
    Well what libraries are you using? Just because you aren't allocating memory doesn't mean they aren't. Also without really knowing what Windows is doing behind the scenes it is almost impossible to know why it is using that amount.

  8. #8
    Hurry Slowly vart's Avatar
    Join Date
    Oct 2006
    Location
    Rishon LeZion, Israel
    Posts
    6,788
    And what is your Stack size?
    All problems in computer science can be solved by another level of indirection,
    except for the problem of too many layers of indirection.
    – David J. Wheeler

  9. #9
    Registered User pronecracker's Avatar
    Join Date
    Oct 2006
    Location
    netherlands
    Posts
    158
    I am using no libraries. Except windows ofc.
    I don't know what the stack really is (I know how it works in asm, but I don't understand that you can simultaneously store variables on it ), but my compiler sets a default stack size, that could be that big, I only didn't know that that was also shown in task manager.
    Don't call me stupid.

  10. #10
    Woof, woof! zacs7's Avatar
    Join Date
    Mar 2007
    Location
    Australia
    Posts
    3,459
    The stack size set by default in most compilers rather large, consider reducing it (somewhere in prefs or something).

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory allocation/reallocation
    By magda3227 in forum C Programming
    Replies: 10
    Last Post: 07-04-2008, 03:27 PM
  2. Memory usage and memory leaks
    By vsanandan in forum C Programming
    Replies: 1
    Last Post: 05-03-2008, 05:45 AM
  3. What's the difference?
    By Stonehambey in forum C++ Programming
    Replies: 9
    Last Post: 04-02-2008, 10:26 AM
  4. Memory Leak Help
    By (TNT) in forum Windows Programming
    Replies: 3
    Last Post: 06-19-2006, 11:22 AM
  5. Managing shared memory lookups
    By clancyPC in forum Linux Programming
    Replies: 0
    Last Post: 10-08-2003, 04:44 AM