- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Describe the issues in a programming language design that affects storage management?
There are various issues in programming language design that affect the utilization of storage by a running program. There are several elements to which storage must be allocated to execute the object program. Storage space is majorly required for object programs and user-defined data structures, variables, and constants. There is also a need for storage space for procedure linkage information, temporaries required for expression evaluation, and parameter passing.
There are the different ways in which various programming languages arrange space for object program are −
Static storage allocation− It is the simplest allocation scheme in which allocation of data objects is done at compile time because the size of every data item can be determined by the compiler. The storage space for all programs and data can be allocated at compile time, statically if the size of every data item can be determined by the compiler and if recursive procedure calls are not permitted. This scheme is easy to implement and requires no runtime support.
Dynamic storage allocation− If a programming language permits either recursive procedures or data structures whose size is adjustable, then dynamic storage allocation is necessary.
There are two types of dynamic storage allocation which are as follows −
- Stack allocation− It is useful for handling recursive procedures. As each procedure is called, it places its data on top of a stack, and when the procedure returns, it pops its data off the stack. Some sort of stack is used at run time.
Advantages
- It supports recursion.
- It creates a data structure for the data item dynamically.
Disadvantages
- Memory Addressing can be done using pointers & index Registers. So, the type of allocation is slower than static allocation.
Heap allocation− It is useful for implementing data whose size varies as the program is running. It involves taking a large block of memory and dividing it into variable-length blocks, some used for data and some free. When a piece of data is created, it can find a free block of memory. When data is no longer needed, its block becomes free.
There are two methods used for Heap management are as follows −
Garbage Collection Method
When the all-access path to an object is destroyed, but data object continues to exist, such types of objects are said to be garbage. Garbage collection is a technique that is used to reuse that object space.
Reference Counter
By reference counter, an attempt is made to reclaim each element of heap storage immediately after it can no longer be accessed.
- Related Articles
- What are the effects of language design in the programming environment?
- What is role of Run-time Storage Management in compiler design?
- Network Layer Design Issues
- Storage Management
- Design Issues in Data Link Layer
- Data Link Layer Design Issues
- What are the Network Layer Design issues?
- What are the design issues of DES?
- What are the design Issues in the Physical Layer?
- Mass Storage Management
- Design Log Storage System in Python
- Design Issues for the Layers of Computer Networks
- What are the platforms that support Java programming language?
- What is Storage Management?
- What are the design issues in an Artificial Neural Network?
