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
Describe the file system architecture. File System Architecture contains the subsequent components:- Device Driver 1 Device Driver 2 Device Driver 3 Basic fi

Define logical address and physical address. An address formed by the CPU is referred as logical address. An address seen by the memory unit that is the single loaded into the

Explain thread in details

Q. The instance of handshaking used 2 bits: a busy bit as well as a command-ready bit. Is it probable to implement this handshaking with only 1 bit? If it is illustrate the protoc

explain in detail about ipc in linux

Now let's implement bounded producer-consumer with semaphores, a Coke machine which is initially empty: semaphore sem_mutex = 1 // binary semaphore for mutual exclusion, 1==unlo


Since most of the programs require a lot of memory allocation/deallocation, we expect the memory management to be fast, to have low fragmentation, make good use of locality, and be

Partitions and mounting A disk can be sliced into many partitions, or a partition can span multiple disks. Every partition can be either "raw", having no file system, or "cooke

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