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
list trhe various classification of model and types?

1. Problem Domain You will be considering the Wumpus world introduced in Russell and Norvig (2009) Chapter 7. For this programming assignment you'll use Prolog's ability to do in

Priority Scheduling leads to the risk of starvation: a process is ready, but never is given the processor. Some preemptive priority schedulers therefore reserve a fraction of the p

How many disk operations are needed to fetch the i-node for the file /usr/ast/courses/os/handout.t? Assume that the i-node for the root directory is in memory, but nothing else alo

explain in detail about ipc in linux

When you turn in an assignment to be graded in this class, you are making the claim that you neither gave nor received assistance on the work you turned in (except, of course, assi

Explain the TlsAlloc (VOID) This function is used to allocate a TLS index.Any subsequent TLS function calls will require  the handle returned  from TlsAlloc to be passed. The i

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;

Paging full question

What is Belady's anomaly When plotting on a graph the page faults versus the number of available frames. We notice that the number of faults for four frames is greater than th