answersLogoWhite

0


Best Answer

Readers who are familiar with the concepts of dynamic memory and pointers may wish to skip to the next section of this chapter. In this one, the general concepts of static and dynamic memory is outlined. How these issues are specifically handled in Modula-2 is not taken up again until after the rest of the preliminary discussions are complete.

The distinction made in this section is based on the timing and manner for the setting aside of memory for the use of a program. Some memory use is predetermined by the compiler and will always be set aside for the program in exactly the same manner at the beginning of every run of a given program. Other memory is obtained by the program at various points during the time it is running. This memory may only be used by the program temporarily and then released for other uses.

User Avatar

Wiki User

11y ago
This answer is:
User Avatar
More answers
User Avatar

Wiki User

12y ago

It saves lot of memory space.

so no wastage of memory.

also gives faster access to the data.

This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What are the advantages of dynamic memory allocation over static memory allocation?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What are types of memory allocation?

There are two types of memory allocations. 1. Static memory allocation 2. Dynamic memory allocation


Compare and contrast dynamic memory allocation and the allocation of files in secondary storage?

Static Memory Allocation: Allocating the total memory requirements that a data structure might need all at once without regard for the actual amount needed at execution time. Dynamic Memory Allocation: The opposite strategy of static memory allocation - Dynamic Memory Allocation, involves allocating memory as-needed.


What is difference in static and dynamic storage allocation?

Static storage allocation is when a program dedicates an amount of memory for its use at the start of the program. Dynamic storage allocation is when a program only takes storage as it needs it.


At what time the memory is allocated for variable in c and c?

Static memory allocation occurs at compile time where as dynamic memory allocation occurs at run time.


What is the opposite of dynamic allocation?

The opposite of dynamic is static.


Differentiate between static allocation and dynamic allocation?

BS Anwer- static allocation is when something is moved to a location permanantally and dynamic allocation is when something is moved temporarily, but will move again.


What are the two methods of representing a binary tree?

Two method of representing a binary tree is Static allocation, and Dynamic allocation


Difference between dynamic and static memory?

dynamic is the study of motin,while static is at rest it means that the memory which is used at motin time as by usic calloc,mallaoc,free function ,on the other hand static is the memory which only used at compile time or at the time of work in during progrmming,static memory has drawback ,the drawback is that in this memory ware unable to use the excess memory as we allocate already to cover or improvre this type of problem we use dynamic memory allocation.


Why main memory use dynamic memory rather than static memory?

Dynamic memory changes and static stays the same.


Difference between dynamic and static memory allocation?

Static memory allocation is memory allocated on the "stack" and cannot be resized after the initial allocation, while dynamic memory allocation is memory allocated in the "heap", and can be dynamically expanded and shrunk as necessary.


advantages of static partition allocation scheme?

It supports multiprogramming since multiple processes can be stored inside the main memory.


What is dynamic mamory?

Dynamic memory refers to memory that is allocated and deallocated during program execution, as opposed to static memory which is allocated at compile time. In C and C++, dynamic memory allocation is done using functions like malloc() and free(), allowing for flexibility in managing memory resources at runtime. However, improper use of dynamic memory can lead to memory leaks or segmentation faults.