计算机与现代化

• 应用与开发 • 上一篇    下一篇

嵌入式实时系统中动态内存管理算法的设计与实现

  

  1. 西北工业大学计算机学院,陕西西安710129
  • 收稿日期:2015-03-09 出版日期:2015-07-23 发布日期:2015-07-28
  • 作者简介:沈非一(1990-),男,江苏常州人,西北工业大学计算机学院硕士研究生,研究方向:实时存储; 张延园(1954-),男,教授,硕士生导师,硕士,研究方向:软件工程,网络软件,存储网络; 林奕(1976-),男,副教授,硕士生导师,博士,研究方向:网络存储,实时存储。
  • 基金资助:
    国家自然科学基金资助项目(61272123)

A Dynamic Memory Management Method Based on μC/OS

  1. College of Computer Science, Northwestern Polytechnical University, Xi’an 710129, China
  • Received:2015-03-09 Online:2015-07-23 Published:2015-07-28

摘要: 嵌入式实时系统中内存管理是非常重要的组成部分,在兼顾实时性和内存碎片率指标的要求下,本文基于伙伴系统和TLSF算法设计一种新的动态内存管理算法。该算法对于小块内存和大块内存采取不同的处理方式,小块内存利用伙伴算法管理,大块内存利用二级分段索引管理并调整二级索引的分配和释放队列顺序,同时对内存的分割条件予以限定。算法选用μCosIII操作系统作为实验平台,在系统原有的内存管理算法基础上进行实现,实验结果表明该算法具有较好的时间和碎片率综合性能。目前该算法已经得到了实际应用。

关键词: 动态内存管理, &mu, CosIII, 伙伴系统, TLSF

Abstract: Memory management is important in realtime system. This paper develops a new dynamic memory management algorithm based on Buddy system and TLSF algorithm on consideration of both realtime and fragmentation rate. The new algorithm deals with large and small pieces of memory in different ways. Buddy system is used to manage small pieces while large ones are organized by twolevel segregating indices. This paper performs experimental study on μCosIII OS by implementing the new method and which shows good performance in both timeconsuming and fragmentation rate. At present  the method has been applied to an actual project.

Key words: dynamic memory management; &mu, CosIII; Buddy system; TLSF

中图分类号: