Programming Languages Storage Management - PowerPoint PPT Presentation

1 / 12
About This Presentation
Title:

Programming Languages Storage Management

Description:

Stack-based storage management. Heap storage management. fixed-size elements ... Stack-based Storage Management. First Allocated - Last Freed. ... – PowerPoint PPT presentation

Number of Views:2342
Avg rating:3.0/5.0
Slides: 13
Provided by: TruHoa3
Category:

less

Transcript and Presenter's Notes

Title: Programming Languages Storage Management


1
Programming Languages Storage Management
  • Cao Hoaøng Truï
  • Khoa Coâng Ngheä Thoâng Tin
  • Ñaïi Hoïc Baùch Khoa TP. HCM

2
Storage Management
  • Major run-time elements requiring storage
  • Major operations requiring storage to be
    allocated/freed
  • Storage management phases
  • Storage management techniques

3
Run-time elements
  • Code segments
  • System run-time programs
  • library routines
  • storage management routines
  • User-defined data structures
  • Subprogram return points

4
Run-time elements
  • Referencing environments
  • Temporaries in expression evaluation
  • Temporaries in parameter transmission
  • Input-output buffers
  • Miscellaneous system data

5
Run-time operations
  • Subprogram call and return operations
  • Data structure creation and destruction
    operations
  • Component insertion and deletion operations

6
Storage Management Phases
  • Initial allocation allocating free storage
  • Recovery recovering unused storage
  • garbage collection
  • Compaction and reuse
  • compaction to construct large blocks
  • reuse as initial allocation

7
Storage Management Techniques
  • Static storage management
  • Stack-based storage management
  • Heap storage management
  • fixed-size elements
  • variable-size elements

8
Static Storage Management
  • Static allocation allocation that remains fixed
    through out execution.

9
Stack-based Storage Management
  • First Allocated - Last Freed.
  • Simple storage recovery, compaction and reuse.
  • Not applicable if storage needs to be
    allocated/freed at arbitrary points.

10
Heap Storage Management
  • Heap a block of storage within which data are
    allocated/freed in an arbitrary manner.

11
head
head
heap
heap
initial free-space list
12
subprogram code segments and system run-time
routines (statically allocated)
stack bottom
activation records
free space
heap (storage allocated by NEW)
heap bottom
typical Pascal memory organization
Write a Comment
User Comments (0)
About PowerShow.com