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
摘要:
malloc和free是C语言中动态存储管理标准函数,在一个运行繁忙的系统中大量使用这2个函数容易造成内存碎片和系统颠簸。针对上述问题,设计一个内存管理器,采用按最大需求缓存的策略,优化空间复杂度和时间复杂度,进行多线程保护,构成一个通用的内存适配器,特别适用于数据仓库及XML信息处理,可在各类平台类服务器和网关中使用。
关键词:
多线程,
内存管理,
缓存,
双向链表
CLC Number:
ZHA Feng. Design of 3D Universal Memory Manager[J]. Computer Engineering, 2009, 35(22): 77-78.
查 峰. 通用三维内存管理器的设计[J]. 计算机工程, 2009, 35(22): 77-78.