###
计算机系统应用英文版:2026,35(6):98-112
←前一篇   |   后一篇→
本文二维码信息
码上扫一扫!
基于程序行为特征的大块内存分配器
(1.复旦大学 计算与智能创新学院, 上海 200433;2.复旦大学 大数据研究院, 上海 200433)
Large Memory Allocator Based on Program Behavior Characteristics
(1.College of Computer Science and Artificial Intelligence, Fudan University, Shanghai 200433, China;2.Institute of Big Data, Fudan University, Shanghai 200433, China)
摘要
图/表
参考文献
相似文献
本文已被:浏览 39次   下载 54
Received:November 26, 2025    Revised:December 30, 2025
中文摘要: 在硬件资源受限的端侧设备中, 传统通用内存分配机制易产生碎片率高与峰值内存膨胀问题, 导致资源利用率低下. 针对这一问题, 本文提出一种基于程序行为特征的大块内存分配器. 该分配器使用轻量级两级共享缓存架构, 结合基数树与位图实现高效空闲块查找与合并, 在降低内存峰值占用的同时提升了内存管理效率. 对于应用程序的不同行为特征, 该分配器通过融合程序静态特征与动态行为分析, 提取关键内存使用模式用于驱动遗传算法自动搜索最优配置参数, 并在程序执行过程中用于指导分层回收和内存预分配, 减少内存碎片率和分配延时. 实验结果表明, 在大块内存分配频繁的场景中, 本文方案在默认参数下的内存峰值占用已经优于大多数通用内存分配器, 经自适应调优后, 碎片率还可进一步降至5%以下, 而分配延迟开销不超过2.3%. 得益于细粒度锁的同步机制, 本文方案在多线程高并发场景下仍能保持良好扩展性. 本文工作为资源受限环境下的高性能、低碎片内存管理提供了新的思路与方法.
Abstract:In resource-constrained edge devices, conventional general-purpose memory allocation mechanisms are prone to high fragmentation rates and increased peak memory usage, leading to low resource utilization. To address this issue, this research proposes a large memory allocator based on program behavior characteristics. The allocator employs a 2-level light-weight shared cache architecture, where radix trees and bitmaps are utilized for efficient free block searching and coalescing. The lightweight cache design is capable of reducing peak memory consumption and improving memory management efficiency. To accommodate diverse program behavior characteristics, both static program features and dynamic execution data are collected. Key memory usage patterns are extracted from this data to drive a genetic algorithm for the automatic search of optimal configuration parameters. These parameters are then applied during program execution to guide tiered reclamation and memory pre-allocation, thereby reducing memory fragmentation and allocation latency. Experimental results indicate that, in scenarios with frequent large memory allocations, the proposed allocator, even with default configurations, achieves lower peak memory usage than most general-purpose allocators. After adaptive tuning, the fragmentation rate can be further reduced to below 5%, with a negligible increase in allocation delay of only 2.3%. Benefiting from a fine-grained locking mechanism, the proposed allocator maintains good scalability even under high concurrent multi-threaded workloads. This work provides a novel approach for achieving high-performance, low-fragmentation memory management in resource-constrained scenarios.
文章编号:     中图分类号:    文献标志码:
基金项目:国家重点研发计划 (2024QY1203)
引用文本:
周敬森,曹文靖,张为华.基于程序行为特征的大块内存分配器.计算机系统应用,2026,35(6):98-112
ZHOU Jing-Sen,CAO Wen-Jing,ZHANG Wei-Hua.Large Memory Allocator Based on Program Behavior Characteristics.COMPUTER SYSTEMS APPLICATIONS,2026,35(6):98-112