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

计算机工程 ›› 2007, Vol. 33 ›› Issue (24): 83-85. doi: 10.3969/j.issn.1000-3428.2007.24.028

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

嵌入式设备中的内存压缩机制

付 湘1,倪 宏2,朱 明1   

  1. 1. 中国科学技术大学自动化系,合肥 230027;2. 中国科学院声学研究所,北京 100080
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2007-12-20 发布日期:2007-12-20

Memory Compress Mechanism for Embedded System

FU Xiang1, NI Hong2, ZHU Ming1   

  1. 1. Department of Automation, University of Science and Technology of China, Hefei 230027;2. Institute of Acoustics, Chinese Academy of Sciences, Beijing 100080
  • Received:1900-01-01 Revised:1900-01-01 Online:2007-12-20 Published:2007-12-20

摘要: 提出了一种适用于嵌入式设备的内存压缩机制。利用Linux的页面交换机制,创建一个基于内存的交换分区。当系统内存不足需要将某些页面交换到该分区上时,通过压缩这些页面向应用程序和用户提供更多的可用内存。使用空闲内存块匹配算法避免出现过多的内存碎片而影响系统性能。实验测试表明,使用该机制通常可以获得大于50%的可用内存。

关键词: 内存压缩, 交换分区, 页面交换, 块设备驱动

Abstract: This paper proposes a memory compress mechanism for embedded system. It utilizes Linux page swap mechanism to create a memory-based swap partition. When the system runs out of memory and needs to swap some pages to the memory-based swap partition, the mechanism compresses those pages to provide more available memory to applications and users. A proper algorithm is used to match the best availe memory slots to avoid memory fragments. Experimental results indicate that it can provide more than 50% available memory.

Key words: memory compress, swap partition, page swap, block device driver

中图分类号: