Computer Engineering and Applications ›› 2016, Vol. 52 ›› Issue (13): 76-80.
Previous Articles Next Articles
LIU Lin1, ZHU Qing1, HE Zhaohui2
Online:
Published:
刘 林1,朱 青1,何昭晖2
Abstract: The memory management shceme of Free Real Time Operating System(FreeRTOS) has some shortcomings, such as uncertain allocation time, frequent cutting, low utilization rate as well as inadequate consolidation mechanism, this paper adopts a strategy of “precised cutting” and “delayed merging” in order to reduce memory fragment and raise utilization rate furthest. Thus it introduces TLSF(Two-Level Segregated Fit) algorithm into FreeRTOS, using two levels of bitmap index to manage its dynamic memory and improving its process of memory allocation as well as release, then conducts the experimental test on the STM32 platform which ports with FreeRTOS. At last, the results show that this method improves the speed of memory allocation and reduces memory fragmentation rate.
Key words: FreeRTOS, memory management, Two-Level Segregated Fit(TLSF) algorithm, STM32 platform, memory fragment
摘要: 针对FreeRTOS内存管理方案分配时间不确定,切割次数较多,利用率低及合并机制不足等缺点,采用一种“精确切割”和“延时合并”相结合的策略以最大限度减少内存碎片,提高内存利用率。具体实现方法是在FreeRTOS中引入TLSF(Two-level Segregated Fit)算法数据结构,采用二级位图索引对动态内存进行管理,并改进TLSF算法的内存分配和释放过程;最后将改进的算法以及FreeRTOS移植到STM32开发平台上进行实验测试。测试结果表明该方法提高了FreeRTOS的内存分配速度,减少了内存碎片率。
关键词: FreeRTOS操作系统, 内存管理, TLSF算法, STM32开发平台, 内存碎片
LIU Lin1, ZHU Qing1, HE Zhaohui2. Analysis and improvement of memory management scheme in FreeRTOS[J]. Computer Engineering and Applications, 2016, 52(13): 76-80.
刘 林1,朱 青1,何昭晖2. FreeRTOS内存管理方案的分析与改进[J]. 计算机工程与应用, 2016, 52(13): 76-80.
0 / Recommend
Add to citation manager EndNote|Ris|BibTeX
URL: http://cea.ceaj.org/EN/
http://cea.ceaj.org/EN/Y2016/V52/I13/76