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

计算机工程 ›› 2009, Vol. 35 ›› Issue (22): 77-78. doi: 10.3969/j.issn.1000-3428.2009.22.026

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

通用三维内存管理器的设计

查 峰   

  1. (华为技术有限公司南京研究所,南京 210012)
  • 收稿日期:1900-01-01 修回日期:1900-01-01 出版日期:2009-11-20 发布日期:2009-11-20

Design of 3D Universal Memory Manager

ZHA Feng   

  1. (Nanjing Institute of Huawei Technologies Co., Ltd., Nanjing 210012)
  • Received:1900-01-01 Revised:1900-01-01 Online:2009-11-20 Published:2009-11-20

摘要:

malloc和free是C语言中动态存储管理标准函数,在一个运行繁忙的系统中大量使用这2个函数容易造成内存碎片和系统颠簸。针对上述问题,设计一个内存管理器,采用按最大需求缓存的策略,优化空间复杂度和时间复杂度,进行多线程保护,构成一个通用的内存适配器,特别适用于数据仓库及XML信息处理,可在各类平台类服务器和网关中使用。

关键词: 多线程, 内存管理, 缓存, 双向链表

Abstract: malloc and free are standard functions in C program language for dynamic memory management. If the two functions are used too much frequently in a busy system, it is easy to produce memory fragment and degree the stability of the system. Aiming at this problem, this paper designs a memory manager, adopts most demand cache strategy, optimizes it both on space and time complexity, and provides the protection for multithread, which makes it a universal memory allocator. It is suitable to data warehouse, XML information processing and so on, and can be used in various platform servers and gateways.

Key words: multithread, memory management, cache, double link

中图分类号: