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
How File record length should be chosen File record length should be selected to match the data characteristics

Define caching. A cache is a region of fast memory that holds copies of data. Access to the cached copy is well-organized than access to the original. Caching and buffering are

with the aid of diagrams describe the following OS structure monolithic,layered and client server.

Define rotational latency and disk bandwidth. Rotational latency is the additional time waiting for the disk to rotate the wanted sector to the disk head. The disk bandwidth is

What is critical section problem? Consider a system consists of 'n' processes. Every process has segment of code called a critical section, in which the process might be changi

Q. Describe the three main architectural layers of Windows XP? Answer: (1) The HAL (Hardware Abstraction Layer) creates operating system portability by hiding hardware differ

Discuss difference between symmetric and asymmetric multiprocessing  Symmetric multiprocessing (SMP), in which every processor runs an identical copy of the operating system an

What are privileged instructions? Some of the machine instructions that may cause harm to a system are designated as privileged instructions. The hardware permits the privilege


Q. The Sun Ultra SPARC processor has numerous register sets that describe the actions of a context switch if the new context is previously loaded into one of the register sets. Wha