Categories: Activism?, Programming
Updated on 18th April 2008, a complete example on stack and heap
Updated on 15th April 2008, new contents and new layout!
Updated on 6th April 2008, new contents!
At Programming Project course we study project-oriented approaches to Java-based software development. Don't ask me why, the syllabus covers the topic "Modeling program execution with memory models", even if we use Java, the programming language known for letting the developer to write programs without caring about memory.
Anyway, here is a briefly summary of the slides and the explanation of the professor about a simple object oriented memory model (Java as example).
Download the PDF of the summary
Topics covered:
- Memory portions assigned to a program (code area, heap / dynamic memory area), execution stack
- How code is loaded in Java
- The Activation Record (AR) and function calls
- Abbrevations (AR, RV, RA, SP, N/E, @, ??, arb)
- Examples on method calls and activation records usage
- Declaraion vs. Definition of a variable, the scope of a variable, blocks
- Scope Activation Record (SAR), Static Link (SL), the role of SL
- The extent/lifetime of a variable
- Dynamic memory allocation and handling
- Dynamic vs. Static memory allocation
- Dynamic memory scope and extent
- Accessing dynamic memory
- Classes and Objects in detail, object instantiation
- Memory Management issues
- Objects vs. Variables (definitions)
- Methods of Objects
- Class Attributes
- The null value
- Parameters (formal, actual), parameters passing (by reference, by value)
- Constructors and Inline Initialization
- Constructor's call
- Class attributes (static variables)
- Class methods (static methods)
- Complete Example of Stack/Heap Diagrams
Everything is integrated with simple examples.
Recent Comments: