Here are questions relating to how your source code affects memory allocation.
See also the following linked information in other sections.