Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Dynamic Memory Allocation
#1

In computer science dynamic memory allocation is the allocation of memory storage for use in a computer program during the runtime of that program. It is a way of distributing ownership of limited memory resources among many pieces of data and code. A dynamically allocated object remains allocated until it is deallocated explicitly, either by the programmer or by a garbage collector this is notably different from automatic and static memory allocation. It is said that such an object has dynamic lifetime.

The problem of fulfilling an allocation request, which involves finding a block of unused memory of a certain size in the heap, is a difficult problem. A wide variety of solutions have been proposed, including:

1)Free lists
2)Paging
3)Buddy memory allocation

The main problem for most dynamic memory allocation algorithms is to avoid both internal and external fragmentation while keeping both allocation and deallocation efficient. Also, most algorithms in use have the problem that a large number of small allocations can cause wasted space due to collecting metadata; thus most programmers avoid this, sometimes by using a strategy called chunking.
Reply

#2
In computer science dynamic memory allocation is the allocation of memory storage for use in a computer program during the runtime of that program. It is a way of distributing ownership of limited memory resources among many pieces of data and code. A dynamically allocated object remains allocated until it is deallocated explicitly, either by the programmer or by a garbage collector this is notably different from automatic and static memory allocation. It is said that such an object has dynamic lifetime.

The problem of fulfilling an allocation request, which involves finding a block of unused memory of a certain size in the heap, is a difficult problem. A wide variety of solutions have been proposed, including:

1)Free lists
2)Paging
3)Buddy memory allocation

The main problem for most dynamic memory allocation algorithms is to avoid both internal and external fragmentation while keeping both allocation and deallocation efficient. Also, most algorithms in use have the problem that a large number of small allocations can cause wasted space due to collecting metadata; thus most programmers avoid this, sometimes by using a strategy called chunking.
Reply

#3
Basically, dynamic memory allocation involves the allocation of memory storage for use in a computer program during the runtime of that program. The limited memory resources may thus be efficiently distributed among many pieces of data and code. the programmer either explicitly releases the memory thus allocated after use or the garbage collector does this.

Efficiency
The dynamic memory allocation algorithm actually used in the computer can impact performance significantly. the overheads involved for a variety of allocators is a major differentiator of the speed.

Implementations
Buddy blocks: These involve the allocation of memory from a large block in memory that is a power of two in size. sorted linked list or tree contains all the blocks that are of a particular size.

Fixed-size-blocks allocation
: Here, a free list of fixed-size blocks of memory is used. This implementation works well with the embedded sysytems.

http://en.wikipediawiki/Dynamic_memory_allocation
http://osdevertutorials/25.alloc.pdf
Get the powerpoint at:
http://csl.mtu.edu/cs3090/ww/lecture-not...cation.ppt
Reply

#4
I need a seminar report on DYNAMIC MEMORY ALLOCATION Sad :'( plzz
Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

Powered By MyBB, © 2002-2024 iAndrew & Melroy van den Berg.