By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,462 Members | 1,490 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,462 IT Pros & Developers. It's quick & easy.

Memory Footprint

P: n/a
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.

Nov 22 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
On 14 Nov 2005 22:04:03 -0800, "nilavya" <ni*****@gmail.com> 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/~a...FAQ-acllc.html
Nov 22 '05 #2

P: n/a
> 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/RealtimeMa...erformance.htm

http://www.eventhelix.com/RealtimeMa...rformance2.htm

--
EventStudio System Designer 2.5 - http://www.EventHelix.com/EventStudio
Sequence Diagram Based System Design and Object Modeling Tool

Nov 22 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.