现有的内存管理的工作多集中在内存分配的效率上,实时性较好,但易产生内存碎片。为此,提出基于线段树的高效内存管理方法。该方法将内存地址空间划分为内存段,建立内存管理线段树,基于所建立的内存管理线段树,进行高效灵活的内存分配和回收管理,减少了内存碎片的产生。另外,针对线段树空间开销大的问题,提出了线段树空间优化的方法。实验结果表明,所提出的内存管理方法,具有效率高、产生的内存碎片少、内存管理空间开销小等优势。
Most existing works on memory management focus on the efficiency, which are real-time, but have memory fragmentation problems. To address the problem, an efficient memory management algorithm based on segment tree was proposed. The proposed method built a memory management segment tree by dividing memory space into segments, and allocated and reclaimed memory efficiently and flexibly based on the memory management segment tree to reduce the memory fragmentation. Furthermore, a method was proposed to optimize the space complexity of segment trees. The experimental results show that the proposed method has advantages in terms of efficiency, memory fragmentation, storage space, and so on.