Dynamic memory management, Operating System

Usually memory is allocated from a large pool of unused memory area called the heap. In C++, dynamic allocation/deallocation must be manually performed using commands like malloc, free, new and delete. Malloc allocates space of a given size and gives a pointer back to the programmer. The programmer then can do whatever he or she wants with it. The new command, on the other hand, allocates a speci?c object of a given size. The general way in which dynamic allocation is done is that the program asks the memory manager to allocate or free objects (or multiple pages); then, the memory manager asks the OS to allocate/free pages (or multiple pages). Notice, how- ever, that the allocator does not give the whole allocated page back to the program; it just gives what it asked for. The rest of the page (i.e. the parts not given to the program) is saved for future memory requests.

Posted Date: 3/12/2013 6:03:44 AM | Location : United States







Related Discussions:- Dynamic memory management, Assignment Help, Ask Question on Dynamic memory management, Get Answer, Expert's Help, Dynamic memory management Discussions

Write discussion on Dynamic memory management
Your posts are moderated
Related Questions
A system consists of 10 units of resource class Ru. The resource needs of three user processes P1, P2 and P3 are like this                     Using Banker's algorithm, de

Write an application that does the following:(1) fill an array with 50 random integers; (2) loop through the array, displaying each value, and count the number of negative values;

what are the factors influencing the choice of a mode of transportation?

Q. Give an instance of an application in which data in a file should be accessed in the following order: a. Sequentially b. Randomly Answer: a. Print the content of

Transferring files from Windows to Unix Be very careful transferring files from Windows to Unix. If you do transfer a file from Windows to Unix open the file, in Unix, using vi

Performance of Job Scheduling  Strategies In this project you will investigate the performance of Job Scheduling strategies, Memory Allocation strategies and a CPU Scheduling s

Which is most common phase structured grammar? Most common phase structured grammar is Context – Sensitive

Synchronization serves two purposes: 1) to ensure safety for updates on shared data (e.g. to avoid races conditions), and 2) to coordinate and order actions taken by threads (e.g.


Consider the following snapshot of a system, answer the following questions using the banker's algorithm: 1. What is the content of the matrix Need? Is the system in a safe stat