Memory Partitioner
Memory Management
- Replaces malloc() and free()
- malloc and free has some drawbacks, especially in embedded devices.
- Increased code size
- Now determistic behavior
- Fragmentation problems, small block of data
scattered in memory prevent allocation of large blocks.
- uCos provides a partion memory allocator.
- No fragmentation problem
- Runs at a constant time
- Are deterministic
Memory Control Blocks
- Manages a memory partion
- Number of blcoks is set by OS_MAX_MEM_PART in os_cfg.h
- Held in the OSMemFreeList until used.
Using Memory Partions
- Manage a memory partion
- Number of blocks is set by OS_MAX_MEM_PART in os_cfg.h
- Held in the OSMemFreeList until used.