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
Question : (a) In the demand paging system, when a process tries to access a page that was not brought into memory, a page fault occurs that involves a series of actions. The

Multi-user - A multi-user Operating System permits for multiple users to use the same computer at the same time and/or different times. Below are some instances of multi-user Op

A daemon is a process that removes itself from the terminal and disconnected, executes, in the background, waiting for requests and responding to them. It may also be described as

Write a brief note on demand paging. A demand paging is alike to a paging system with swapping. The Processes reside on the secondary memory while we want to implement a proces

Q. How Program execute in operating system? Program execution: Operating system loads a program in memory and executes the program. The program should be able to end its exec

list the prevention of mechanism for race condition with operating system

What are the different files attributes? File name:-it's the name of the file. It's the name with which the user identifies. Identifiers:-it's created when a file is created

Some CPUs provide for more than two modes of operation. What are two possible uses of these multiple modes?

Explain the various file types A common technique for executing file types is to contain the type as part of the file name. The name is split into two parts - a name and an ext