摘要 |
PURPOSE: A dynamic memory management method and device for an embedded system is provided to use fragmented segment and maximize efficiency. CONSTITUTION: The method consists of a dynamic memory administrator(2), a main memory(4) and an application(6). The dynamic memory administrator consists of an allocation request administrator(8), a disallocation request administrator(10), a free block table unit(12) and an unused table unit(14). When a system is booted, the dynamic memory administrator begins operating and the dynamic memory is unused. If an application requests specific size of memory, the allocation request administrator accesses the free block table unit and look for the free block table, which is greater or equal to the requested size. If there is, the allocation request administrator allocates the free block table, which is the closest to the start location to expand the unused area. When an application requests disallocation of memory, the disallication request administrator finds out the location of the memory block. If the block is the most upper block of the unused area, the block is merged into the unused area. Otherwise, if the block is adjacent to any free block, both of them are merged and become one block.
|