|
|
Memory allocationMemory allocation, in computer science, is the act of allocating memory to a program for its usage, typically for storing variables, code or data. Memory allocation is a widely discussed topic in the field of operating systems, as computers have limited computer memory, and many programs need memory to run. To find out more, you can look up on the various memory allocation algorithms and techniques that can be used. == Allocation techniques == *Paging *Buddy memory allocation *Dynamic memory allocation == Fixed-size-blocks allocation == One solution is to have a LIFO linked list of fixed size blocks of memory. This works astonishingly well for simple embedded system. == Buddy blocks == Another solution is to have a ''Buddy memory allocation''. In this system, memory is allocated from a large block of memory that is a power of two in size. If the block is more than twice as large as desired, it is broken in two. One of the halves is selected, and the process repeats (checking the size again and splitting if needed) until the block is just large enough. All the buddies of a particular size are kept in a sorted linked list or Tree data structure. When a block is freed, it is compared to its buddy. If they are both free, they are combined and placed in the next-largest size buddy-block list. (When a block is allocated, the allocator will start with the smallest sufficiently large block avoiding needlessly breaking blocks) Note that buddy block allocators are not unique to RTOS's, they are also used in conventional operating systems (such as the Linux kernel). == See also == * malloc * mmap * hazard pointer * Hoard memory allocator Memory management Memory allocationThis page probably needs to be merged with dynamic memory allocation. The buddy algorithm discussed herein already has its own article. First-fit, best-fit, and worst-fit probably should be discussed here. Will do this if no one else gets to it first. User:Dcoetzee 17:34, 6 Sep 2004 (UTC) See other meanings of words starting from letter: MMA | MB | MC | MD | ME | MF | MG | MH | MI | MJ | MK | ML | MN | MO | MP | MR | MS | MT | MU | MW | MX | MY | MZ |Words begining with Memory_allocation: Memory_allocation Memory_allocation |
These materials are based on Wikipedia and licensed under the GNU FDL
YouTube.com videos better site than Turbo Tax 2007 |
|
|