0% found this document useful (0 votes)
8 views10 pages

Run time storage management

Run time storage management involves the use of memory for code, static data, and dynamic data objects. Memory can be managed through activation records, which contain information needed for a single execution of a procedure, and can be allocated statically, on the stack, or on the heap. Each allocation method has its constraints and use cases, with static allocation requiring compile-time knowledge, stack allocation managing memory in a LIFO manner, and heap allocation allowing for dynamic memory management.

Uploaded by

mastanbisk038
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views10 pages

Run time storage management

Run time storage management involves the use of memory for code, static data, and dynamic data objects. Memory can be managed through activation records, which contain information needed for a single execution of a procedure, and can be allocated statically, on the stack, or on the heap. Each allocation method has its constraints and use cases, with static allocation requiring compile-time knowledge, stack allocation managing memory in a LIFO manner, and heap allocation allowing for dynamic memory management.

Uploaded by

mastanbisk038
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 10

Run time storage

management
Run time storage management
We need to use memory to store
Code
Static data( local & global variables)
Dynamic data objects
 Data that are used when executing a certain
procedure.
 Dynamically allocated objects
 free

 malloc
Run time memory
Activation record
Memory can be managed by activation
records
Also called as frames
Information needed by a single execution of a
procedure
A general activation record has a seven fields
Activation record fields
Storage -memory
Static allocation
Stack allocation
Heap allocation
Static allocation
Lays out storage for all data objects at
compile time
Constraints
 Size of the object must be known and alignment
requirements must be known at compile time
 No recursion
 No dynamic data structure
Stack allocation
Stack allocation manages the runtime
storage as a stack
The activation record is pushed on as a
function entered
The activation record is popped off as a
function exits.
Local variables bound to fresh storage.
Constraints:
 Values of locals cannot be retained when an
activation ends.
Heap allocation
Allocates and deallocates storage as needed
at runtime from a data area called as heap
Does not require the activation of procedures
to be LIFO
Requires true dynamic memory management.

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy