answersLogoWhite

0

What is the role of heap in the dynamic memory allocation?

Updated: 8/18/2019
User Avatar

Wiki User

14y ago

Best Answer

memory allocation has two types : static and dynamic

1) the static are for the data types that will never change in size during the program execution suxh as integers (1 and 1000 will take the same size if we declare them to have the same type).

2) while another data types such as arrays and lists , will grow and shrink during execution time (due to the addition and removing) .

the HEAP is the part of the memory where such data (in part 2) are allocated.

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: What is the role of heap in the dynamic memory allocation?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

What is Project Management's role?

The Project Management's role is a very dynamic role which is constantly evolving with the changing dynamics of the day to day operations of the project. The correct allocation of personnel to their best matched role is paramount. Skills, tools and techniques all have to be taken into consideration.


What is the significance of pointers in C/C++ programming and how are they used in memory manipulation?

Pointers play a crucial role in C/C++ programming and are powerful tools for memory manipulation. They hold memory addresses that point to specific locations in computer memory. Here's how they are significant and used in memory manipulation: Memory Access: Pointers allow direct access to memory locations, giving programmers fine-grained control over data. They enable efficient memory allocation, deallocation, and manipulation. Dynamic Memory Allocation: Pointers facilitate dynamic memory allocation using functions like malloc() and new. This allows memory to be allocated at runtime, enabling the creation of data structures such as linked lists, trees, and dynamic arrays. Passing Parameters by Reference: Pointers enable passing parameters by reference, which allows functions to modify the original values of variables passed to them. This is useful for implementing functions that need to modify variables outside their scope. Efficient Data Structures: Pointers are fundamental for creating complex data structures like linked lists, trees, graphs, and dynamic arrays. They allow for efficient memory management and traversal of these data structures. Pointer Arithmetic: Pointers can be manipulated using arithmetic operations such as addition and subtraction. This allows for efficient traversal of arrays, strings, and data structures, as well as random access to specific memory locations. Memory Optimization: Pointers help optimize memory usage by allowing the sharing of memory resources among variables, reducing memory footprint, and improving performance. Low-Level Programming: Pointers are essential for low-level programming tasks, including interfacing with hardware, accessing operating system APIs, and implementing low-level algorithms. Efficient String Manipulation: Pointers are commonly used for string manipulation, as they allow for efficient traversal and modification of characters within a string. However, it's important to note that while pointers offer flexibility and control, improper use can lead to issues such as memory leaks, segmentation faults, and undefined behavior. Care must be taken to properly manage memory and handle pointers to avoid such problems. Overall, pointers provide a powerful mechanism for memory manipulation in C/C++ programming, enabling efficient memory allocation, data structure implementation, and low-level programming tasks. They are a fundamental aspect of C/C++ and contribute to the language's versatility and efficiency.


What has the author Stephen Heap written?

Charles C. Heap has written: 'Guidance notes for the implementation of small scale packaged combined heat and power'


Which neurotransmitter plays the most direct role in learning and memory?

Acetylcholine is essential to the memory. Without it the memory would not exist.


Does dopamine play a role in memory?

No


Why is the septimus heap movie animated?

I think the Septimus Heap movie is going to be animated so they can match the characters faces like the ones in the books! A good role to play Jenna would be Tiffany Giradina


What plays a role when deciding cost allocation?

There are many roles that are required when one is deciding on cost allocation. Control costs must be taken into consideration and it is beneficial to one to conduct responsible financial management of resources.


What is dynamic security?

Dynamic security is a role of the prison officer for normal activities, movement of individuals and official visits. Dynamic security must also be backed by a serious disciplinary code for dealing with bad behavior.


What role do memory cells play in immunity?

no


What is the role of memory to store both data and programs is known as the concept?

The role of memory to store both data and programs is known as the stored program concept. Memory stores three types of items.


What is mean by role allocation?

Role Allocation was created by Parsons, and built on by Davis and Moore (all functionalist thinkers. It is the process in education by which students are judged on aptitude and ability and siggested suitable career/work roles, making sure the highest jobs (e.g. surgeons, pilots) are undertaken by the most talented people.


Do dynamic characters support the role of static ones?

no. static characters support the role of dynamic characters. a dynamic character is usually the main character who's personality changes throughout the story, usually after an important lesson has been learned. static characters are usually secondary and stay the same throughout the story.