Abstract: Long-running embedded systems developed in C and C++ are prone to memory leaks and unbounded memory growth due to manual memory management. Traditional memory analysis and leak detection tools are
often not suitable, as they require system restarts or recompilation, and impose excessive overhead on
resource-constrained hardware. This thesis presents the design and implementation of MemScope, a lightweight, runtime-attachable tracing framework for embedded Linux systems. MemScope leverages Extended Berkeley Packet Filter (eBPF)-based user space probes to monitor heap allocation and deallocation events without modifying the
target application. The framework can be attached to processes that are already running and monitor memory
activity from the point of intervention. The framework reconstructs the memory state, enables time-resolved growth observability, and maps allocations to their respective call stacks for precise source-level attribution. The system was evaluated on a resource-constrained embedded platform under controlled workloads. The results demonstrate bounded memory consumption, manageable runtime overhead, and stable operation during extended monitoring sessions. MemScope provides structured runtime allocation data that significantly reduces manual diagnostic effort.
Keywords: Memory Leaks, Embedded Systems, Observability, Linux
PDF: Master Thesis
Reference: Juliane Friedmann. From Allocation to Accumulation: Investigating Memory Leaks and Other Causes of Growing Memory Requirements on Linux. Master Thesis. Friedrich-Alexander-Universität Erlangen-Nürnberg: 2026.
Discover more from Professorship for Open-Source Software
Subscribe to get the latest posts sent to your email.