Memory Footprint

N

nilavya

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.
 
J

Jack Klein

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.
 
E

EventHelix.com

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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top