Memory Allocation

  Dynamic memory allocation 
Memory 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 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

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 systems.

Buddy blocks

Another solution is to have a binary buddy block allocator. 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. 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

* mmap

 

<< PreviousWord BrowserNext >>
kawachi
royal military college of canada
pregnancy in science fiction
daryl bem
coeducation
streaking
time based currency
covenanted baptist church of canada
nervous gender
39
culture of the philippines
heinkel he 178
chen (surname)
reichenbach falls
philippine basketball association
lip rounding
the units
full gospel baptist church fellowship
chibi chibi
meiji constitution
synthpunk
wu sangui
american nazi party
chen yuanyuan
buddy memory allocation
pet shop of horrors
don't look back (album)
change the world without taking power
list of people by name: hab haf
the invisibles
list of people by name: hag hah
list of people by name: hai hak
list of people by name: hal
magic carpet
list of people by name: ham
sbc
list of people by name: han
ptat 1
list of people by name: hao haq
baptist union of great britain
third stage
aeroparque jorge newbery
list of people by name: harr
list of people by name: has hat