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
Q. Why do some systems stay track of the type of a file while others leave it to the user or simply don't implement multiple file types? Which system is "better?" Answer: A f

Q. What are the advantages as well as disadvantages of using circuit switching? For what types of applications is circuit switching a viable strategy? Answer: Circuit

What is degree of multiprogramming ? Degree of multiprogramming signifies the number of processes in memory. If the degree of Multiprogramming is steady after that the average

WHAT IS OPERATING SYSTEM ?ENLIST AND EXPLAIN BASIC SERVICES PROVIDE BY OS

The drawbacks of fixed partitioning are: The number of partitions are précised at system generation time limits the number of active processes in the system. For the re

why we say " OS is a resource allocator" and “OS is a control program"?

Question: (a) As a System administrator, elaborate on how you can manage computer accounts in Active Directory of Windows Server 2008? (b) Explain the following user p

Explain what semaphores are, their usage, implementation given to avoid busy waiting and binary semaphores. Semaphore definition Usage for mutual exclusion and process synch

Q. Consider the following page-replacement algorithms. Rank the algorithms on a five-point scale from "bad" to "perfect" according to their page-fault rate. Detach those algorithm

Explain Threads for Executing Concurrent Application Code The thread has been introduced in many operating systems as an efficient mechanism for executing concurrent applicatio