Memory Footprint

Discussion in 'C++' started by nilavya, Nov 15, 2005.

  1. nilavya

    nilavya Guest

    Hi,

    I have an Application developed in eVC++. I have around 40 odd classes
    for that appilcation. Some classes are single instance, they remain
    throughout the execution. I am very eager to know, how are all
    different types of variables actually stored in the memory. I also want
    to know what happens when a function call is made. Does a class having
    too many variables and too many functions affect the execution speed
    specifically on PocketPC. If it affects how can I reduce that. Kindly
    help.

    Thanks,
    With Regards,
    Bhagat Nirav K.
     
    nilavya, Nov 15, 2005
    #1
    1. Advertising

  2. nilavya

    Jack Klein Guest

    On 14 Nov 2005 22:04:03 -0800, "nilavya" <> wrote in
    comp.lang.c++:

    > Hi,
    >
    > I have an Application developed in eVC++. I have around 40 odd classes
    > for that appilcation. Some classes are single instance, they remain
    > throughout the execution. I am very eager to know, how are all
    > different types of variables actually stored in the memory. I also want
    > to know what happens when a function call is made. Does a class having
    > too many variables and too many functions affect the execution speed
    > specifically on PocketPC. If it affects how can I reduce that. Kindly
    > help.


    The C++ language does not specify how variables are called in memory,
    that is up to the implementation, usually influenced by the processor
    hardware and the operating system.

    What happens when a function call is made is that any arguments passed
    to the function are copied into variables that the function can
    access. Then execution is transferred to the function, with the
    caller suspended until the function returns.

    As for variables and functions, a program with none of either will
    execute very, very fast, for it does nothing. As for how to
    specifically make your programs run faster on a PocketPC, you would
    need to ask in a group that supports programming in that environment.
    It is quite possible that changes that would make a program faster on
    one platform will make it slower on another.

    But generally, a program needs at least as many functions and
    variables as are necessary to perform its required operation.

    --
    Jack Klein
    Home: http://JK-Technology.Com
    FAQs for
    comp.lang.c http://www.eskimo.com/~scs/C-faq/top.html
    comp.lang.c++ http://www.parashift.com/c -faq-lite/
    alt.comp.lang.learn.c-c++
    http://www.contrib.andrew.cmu.edu/~ajo/docs/FAQ-acllc.html
     
    Jack Klein, Nov 15, 2005
    #2
    1. Advertising

  3. > I have an Application developed in eVC++. I have around 40 odd classes
    > for that appilcation. Some classes are single instance, they remain
    > throughout the execution. I am very eager to know, how are all
    > different types of variables actually stored in the memory. I also want
    > to know what happens when a function call is made. Does a class having
    > too many variables and too many functions affect the execution speed
    > specifically on PocketPC. If it affects how can I reduce that. Kindly
    > help.


    The following articles map C++ code to equivalent C code. This should
    answer most of your questions.

    http://www.eventhelix.com/RealtimeMantra/Basics/ComparingCPPAndCPerformance.htm

    http://www.eventhelix.com/RealtimeMantra/Basics/ComparingCPPAndCPerformance2.htm

    --
    EventStudio System Designer 2.5 - http://www.EventHelix.com/EventStudio
    Sequence Diagram Based System Design and Object Modeling Tool
     
    EventHelix.com, Nov 15, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Beatrice Rutger

    JMS memory footprint size

    Beatrice Rutger, Jun 5, 2005, in forum: Java
    Replies:
    0
    Views:
    370
    Beatrice Rutger
    Jun 5, 2005
  2. gbrun
    Replies:
    1
    Views:
    456
    Andrey Kuznetsov
    Feb 19, 2006
  3. Adam Warner

    Memory footprint of a subclass

    Adam Warner, Feb 27, 2006, in forum: Java
    Replies:
    3
    Views:
    654
    Adam Warner
    Feb 27, 2006
  4. Replies:
    9
    Views:
    1,117
    nibblix
    Apr 24, 2006
  5. nick
    Replies:
    58
    Views:
    1,954
    Bart van Ingen Schenau
    Mar 16, 2009
Loading...

Share This Page