摘要
为满足大型监控软件实时处理海量数据需高效利用内存的需求,介绍了一种基于Dephi7 TStringList对象运行时高效保障内存一致性的方法;该方法以中央空调分户计费监控软件为实例,资源映射图内存分配器为基础,典型内存状态为依据,具体分析了内存静态单链表及双向链表的结构特点及操作机理,内存碎片产生的原因,以及跟踪、定位及避免内存重分配导致数据移位的固有缺陷,得出了写内存时需通过对象运行实例所在的内存句柄局部锁死该对象运行实例,读内存时需通过比对对象运行实例的基址,以判断是否产生内存碎片;若产生内存碎片,则需对齐该对象运行实例的写内存基址,以内存碎片产生的最小间隔时间的一半为初值代人,自适应分段线性及分级索引寻址。
This paper introduced a method of high-effect ensuring memory compatibility of TStringList’s objects of run-time.The method took that the central authority air-conditioning mark of family meter fee SCADA as example,the resource mapping picture memory allocator as a basis,representative memory state as a reference.It analyzed the structure characteristic and operation mechanism of the single memory static state link-list and the two-way link-list concretely,the cause of the memory fragment produces, tracked,positioned and avoided the offset of memory data assignment,reached the result of local-locking the instance by memory handle when writing memory,and read this memory by aligning the base address.
出处
《四川兵工学报》
CAS
2014年第9期118-122,共5页
Journal of Sichuan Ordnance
关键词
对象运行实例
资源映射图内存分配器
链表结构
内存碎片
内存一致性
内存数据移位
基址对齐
堆程序
object instance
resources mapping picture memory allocator
link-list’s structure
memory fragment
memory compatibility
memory data shift
base address alignment
heap program