基于程序行为特征的大块内存分配器
作者:
作者单位:

作者简介:

通讯作者:

中图分类号:

基金项目:

国家重点研发计划 (2024QY1203)


Large Memory Allocator Based on Program Behavior Characteristics
Author:
Affiliation:

Fund Project:

  • 摘要
  • |
  • 图/表
  • |
  • 访问统计
  • |
  • 参考文献
  • |
  • 相似文献
  • |
  • 引证文献
  • |
  • 资源附件
  • |
  • 文章评论
    摘要:

    在硬件资源受限的端侧设备中, 传统通用内存分配机制易产生碎片率高与峰值内存膨胀问题, 导致资源利用率低下. 针对这一问题, 本文提出一种基于程序行为特征的大块内存分配器. 该分配器使用轻量级两级共享缓存架构, 结合基数树与位图实现高效空闲块查找与合并, 在降低内存峰值占用的同时提升了内存管理效率. 对于应用程序的不同行为特征, 该分配器通过融合程序静态特征与动态行为分析, 提取关键内存使用模式用于驱动遗传算法自动搜索最优配置参数, 并在程序执行过程中用于指导分层回收和内存预分配, 减少内存碎片率和分配延时. 实验结果表明, 在大块内存分配频繁的场景中, 本文方案在默认参数下的内存峰值占用已经优于大多数通用内存分配器, 经自适应调优后, 碎片率还可进一步降至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.

    参考文献
    相似文献
    引证文献
引用本文

周敬森,曹文靖,张为华.基于程序行为特征的大块内存分配器.计算机系统应用,2026,35(6):98-112

复制
分享
相关视频

文章指标
  • 点击次数:
  • 下载次数:
  • HTML阅读次数:
  • 引用次数:
历史
  • 收稿日期:2025-11-26
  • 最后修改日期:2025-12-30
  • 录用日期:
  • 在线发布日期: 2026-04-29
  • 出版日期:
文章二维码
您是第位访问者
版权所有:中国科学院软件研究所 京ICP备05046678号-3
地址:北京市海淀区中关村南四街4号,邮政编码:100190
电话:010-62661041 传真: Email:csa@iscas.ac.cn
技术支持:北京勤云科技发展有限公司

京公网安备 11040202500063号