- Trending Categories
- Data Structure
- Operating System
- C Programming
- 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.
- It supports recursion.
- It creates a data structure for the data item dynamically.
- 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.
By reference counter, an attempt is made to reclaim each element of heap storage immediately after it can no longer be accessed.
- Storage Management
- What is role of Run-time Storage Management in compiler design?
- Network Layer Design Issues
- Mass Storage Management
- What are the effects of language design in the programming environment?
- Data Link Layer Design Issues
- What are the Network Layer Design issues?
- What are the design issues of DES?
- What is Storage Management?
- Design Issues in Data Link Layer
- What are the design Issues in the Physical Layer?
- Describe the College Management system in three layer architecture?
- What are the platforms that support Java programming language?
- Design Issues for the Layers of Computer Networks
- Federated database management system issues in C++