作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程 ›› 2008, Vol. 34 ›› Issue (8): 80-81. doi: 10.3969/j.issn.1000-3428.2008.08.027

• 软件技术与数据库 • 上一篇    下一篇

实时系统中的动态内存分配算法

孙晓辉,王劲林,陈 晓   

  1. (中国科学院声学研究所网络与数字信号工程技术中心,北京 100080)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2008-04-20 发布日期:2008-04-20

Dynamic Memory Allocation Algorithm in Real-time System

SUN Xiao-hui, WANG Jin-lin, CHEN Xiao   

  1. (Network and Digital Signal Engineering Centre, Institute of Acoustics, Chinese Academy of Sciences, Beijing 100080)
  • Received:1900-01-01 Revised:1900-01-01 Online:2008-04-20 Published:2008-04-20

摘要: 针对实时系统中的内存分配问题,分析实时系统应用程序的行为特点,提出一种使用双级离散表和双级索引位图相结合的动态内存分配方法。对于较小的内存分配请求,使用位图索引来加快速度并且降低内存分割的次数。对于较大内存块,使用双级离散表的方法降低内存碎片。实验表明,该方法具有很低的内存碎片率和确定的响应时间,适合实时性要求较高的系统。

关键词: 动态内存分配, 实时系统, 响应时间

Abstract: Memory allocation is an important issue in developing real-time and embedded applications. This paper introduces a novel memory allocation algorithm which uses hybrid of bitmap fit and segregated fit. It uses a double bitmap fit when the memory block is small, which uses a double segregate list to manage larger memory blocks in order to lower fragmentation. Experimental results show the method has low fragmentation and a bounded response time, which is suit for real-time systems.

Key words: dynamic memory allocation, real-time system, response time

中图分类号: