In order to solve the problems existing in the normal operation of browser and reduce the memory fragments caused by the frequent memory allocation and release, the pooled allocation and vector allocation policies of memory management are proposed to study the design of embedded system for memory management. The pooled allocation is adopted to recycle the spaces inside the pool without predicting the memory size. The vector allocation with Compaction mechanism is used to move the occupied objects and discarded objeas for optimizing the memory occupation and reducing the memory fragments. In addition, the comparisons and analyses of the efficiency between the memory management and the system-level are also implemented. The results show that the proposed policies have better efficieney.%为了解决嵌入式设备中内存频繁分配和释放所引起的内存碎片以及浏览器正常运行难问题,提出具有垃圾回收机制的可动态增长池式分配数据结构设计和具有Compaction机制的Vector分配方法;在嵌入式环境系统设计时,采用可回收动态增长池式分配策略,系统无需预测内存大小,而且可以循环使用池内空间Compaction机制的Vector分配方法可以移动"在用"对象和"废弃"对象调整内存占用,减少碎片.实验设计中应用上述策略,验证了该内存管理效率比系统级效率要高,嵌入式设备中打开网页文件越大,体现出来的效率更高.
展开▼