摘要
针对嵌入式系统中内存管理存在的实时性与碎片率较大等问题,分别从时间和空间角度对其进行分析,采用基于预测分配和合并分配原理的预测-合并分配机制。从时间上,利用预测线程预测下一次申请内存的大小,提前分配以减少系统等待内存创建的时间;将2次申请的内存块合并成一大块,以大块为申请单位申请内存块,以降低内存块被多次分割导致的内部碎片。μC/OS-Ⅱ平台对比实验结果表明,改进后的预测-合并内存分配算法能有效从时间和内存碎片率方面提高系统的整体性能。
Aiming to solve problems of the timeliness and the large debris in the memory management of embedded systems, the forecast-combination mechanism based on the principle of the forecast distribution and the combination distribution was adopted from the perspective of the time and the space. Firstly, the required memory whose size was predicted by using a prediction thread in advance was allocated to reduce the time that the system awaited the required memory to be created. Secondly, two memory blocks were combined into one which was taken as a unit to apply for the chunk memory. Therefore the internal frag- ments caused by the splits were reduced. According to the μC/OS-Ⅱ platform comparative experimental results, the improved forecast-combination memory allocation algorithm can effectively improve the overall system performance in terms of the time and the memory fragmentation.
出处
《计算机工程与设计》
CSCD
北大核心
2014年第9期3056-3060,3162,共6页
Computer Engineering and Design
基金
国家自然科学基金项目(61063001)
广西自然科学基金项目(0832264)
关键词
内存块
利用率
碎片率
预测
合并
memory blocks
availability
rate of fragmentation
prediction
merge