Ch 4. Memory Management


Click here to start

Table of Contents

Ch 4. Memory Management

Memory Management

Common Errors in C++

Memory Model

Stack Resident Memory Values

Program Example: test()

Drawbacks Using Stack

Lifetime Errors

Program Example: readALine()

Size Errors - Slicing Problem

Array Allocations

Program Example

Slicing Problem

Slicing Problem

Heap Resident Memory Values

Heap Resident Memory Values

Recovery of Heap Based Memory

Common Error in C++

Match memory allocations and deletions

Simple Techniques to manage heap

Encapsulating Memory Management

Program Example: resize()

Destructor in C++

finalize in Java

Execution Tracer

Program Example: class Trace

Program Example: procedures

Auto_ptr Class

Reference Count

Reference Count (Table)

Author: Student Computing Facilities


Home Page: