{"title":"LWMalloc: A Lightweight Dynamic Memory Allocator for Resource-Constrained Environments","authors":"Taehyeon Kim;Hwajung Kim","doi":"10.1109/JIOT.2025.3541247","DOIUrl":null,"url":null,"abstract":"In this study, we propose LWMalloc, a lightweight dynamic memory allocator designed for resource-constrained environments. LWMalloc incorporates a lightweight data structure, a deferred coalescing (DC) policy, and dedicated small chunk pools to optimize memory allocation. The lightweight data structure minimizes metadata overhead, ensuring a compact and efficient implementation. The DC policy reduces execution overhead by postponing redundant operations until allocation, maintaining both efficiency and low-response times. Dedicated small chunk pools enable <inline-formula> <tex-math>$\\mathcal {O}(1)$ </tex-math></inline-formula> allocation for small memory requests, which are common in dynamic allocation patterns, by segregating them into fixed-size pools. Experimental results using real-world applications demonstrate that LWMalloc outperforms ptmalloc, the default allocator in Linux, achieving up to 53% faster execution time and 23% lower memory usage. With a compact implementation of only 530 lines of code and a 20-KB size, significantly smaller than ptmalloc’s 4838 lines and 116 KB, LWMalloc achieves an effective balance between performance and memory efficiency, making it highly suitable for resource-constrained environments.","PeriodicalId":54347,"journal":{"name":"IEEE Internet of Things Journal","volume":"12 12","pages":"19532-19548"},"PeriodicalIF":8.9000,"publicationDate":"2025-02-12","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":null,"platform":"Semanticscholar","paperid":null,"PeriodicalName":"IEEE Internet of Things Journal","FirstCategoryId":"94","ListUrlMain":"https://ieeexplore.ieee.org/document/10883044/","RegionNum":1,"RegionCategory":"计算机科学","ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"Q1","JCRName":"COMPUTER SCIENCE, INFORMATION SYSTEMS","Score":null,"Total":0}
引用次数: 0
Abstract
In this study, we propose LWMalloc, a lightweight dynamic memory allocator designed for resource-constrained environments. LWMalloc incorporates a lightweight data structure, a deferred coalescing (DC) policy, and dedicated small chunk pools to optimize memory allocation. The lightweight data structure minimizes metadata overhead, ensuring a compact and efficient implementation. The DC policy reduces execution overhead by postponing redundant operations until allocation, maintaining both efficiency and low-response times. Dedicated small chunk pools enable $\mathcal {O}(1)$ allocation for small memory requests, which are common in dynamic allocation patterns, by segregating them into fixed-size pools. Experimental results using real-world applications demonstrate that LWMalloc outperforms ptmalloc, the default allocator in Linux, achieving up to 53% faster execution time and 23% lower memory usage. With a compact implementation of only 530 lines of code and a 20-KB size, significantly smaller than ptmalloc’s 4838 lines and 116 KB, LWMalloc achieves an effective balance between performance and memory efficiency, making it highly suitable for resource-constrained environments.
期刊介绍:
The EEE Internet of Things (IoT) Journal publishes articles and review articles covering various aspects of IoT, including IoT system architecture, IoT enabling technologies, IoT communication and networking protocols such as network coding, and IoT services and applications. Topics encompass IoT's impacts on sensor technologies, big data management, and future internet design for applications like smart cities and smart homes. Fields of interest include IoT architecture such as things-centric, data-centric, service-oriented IoT architecture; IoT enabling technologies and systematic integration such as sensor technologies, big sensor data management, and future Internet design for IoT; IoT services, applications, and test-beds such as IoT service middleware, IoT application programming interface (API), IoT application design, and IoT trials/experiments; IoT standardization activities and technology development in different standard development organizations (SDO) such as IEEE, IETF, ITU, 3GPP, ETSI, etc.