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
摘要: 提出了一种适用于嵌入式设备的内存压缩机制。利用Linux的页面交换机制,创建一个基于内存的交换分区。当系统内存不足需要将某些页面交换到该分区上时,通过压缩这些页面向应用程序和用户提供更多的可用内存。使用空闲内存块匹配算法避免出现过多的内存碎片而影响系统性能。实验测试表明,使用该机制通常可以获得大于50%的可用内存。
关键词:
内存压缩,
交换分区,
页面交换,
块设备驱动
CLC Number:
FU Xiang; NI Hong; ZHU Ming. Memory Compress Mechanism for Embedded System[J]. Computer Engineering, 2007, 33(24): 83-85.
付 湘;倪 宏;朱 明. 嵌入式设备中的内存压缩机制[J]. 计算机工程, 2007, 33(24): 83-85.