Inline videos. See also:Category: Articles with embedded Videos..

Dynamic memory allocation

From Biocrawler, the free encyclopedia.

It has been proposed that this article or section be merged with Memory allocation.

This request may be discussed on the article's talk page.

It has been proposed that Heap-based memory allocation be merged and redirected into this article.

This request may be discussed on the article's talk page.

Dynamic memory allocation is the allocation of memory storage for use in a computer program during the runtime of that program. Memory is typically allocated from a large pool of all available unused memory called the heap, but may also be allocated from multiple pools. 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. We say 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:

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.

Language support

Dynamic allocation of some kind is supported in almost every mainstream programming language. The malloc function is used to dynamically allocate memory in C. A new operator or keyword is used to dynamically allocate memory in Ada, C++, Pascal and Java.

External links

Wikipedia (http://en.wikipedia.org/wiki/Main_Page) Dynamic_memory_allocation (http://en.wikipedia.org/wiki/Dynamic_memory_allocation) version history (http://en.wikipedia.org/w/index.php?title=Dynamic_memory_allocation&action=history) GNU Free Documentation Lizenz (http://en.wikipedia.org/wiki/Wikipedia:Text_of_the_GNU_Free_Documentation_License) CC-by-sa (http://creativecommons.org/licenses/by-sa/2.5/)

Personal tools
Google Search
Google
Web
biocrawler.com

 
In other languages