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 copy on write on pages when many process works at a same time?

Q. What merit is there in having different time-quantum sizes on different levels of a multilevel queuing system? Answer: Processes that require more frequent servicing for ins

Q. What are the major advantages of the microkernel approach to system design? Answer: Benefits usually include the following (a) Adding a new service doesn't require modify

What is the Translation Lookaside Buffer (TLB) In a cached system, the base addresses of the last few referenced pages is maintained in registers known as the TLB that aids in

What is independent process? A process is independent it cannot influence or be affected by the other processes implementing in the system. Any process does not share data with

Q. Why would it be an awful idea for gateways to pass broadcast packets between networks? What would be the merite of doing so? Answer: All broadcasts would be spreads to all

Optimal page replacement An optimal page replacement algorithm has the least page fault rate of all algorithms. The algorithm states that put back the page that will not be us

Deadlocks can be detected while the program is running, by running cycle detection algorithms on the graph that de?nes the current use of resources. De?ne this graph as follows:

The general idea of a producer-consumer architecture is related to building a pipeline of threads, similar to the web spider from Project 2. Each step of the processing will now be