International Journal For Multidisciplinary Research

E-ISSN: 2582-2160     Impact Factor: 9.24

A Widely Indexed Open Access Peer Reviewed Multidisciplinary Bi-monthly Scholarly International Journal

Call for Paper Volume 7, Issue 6 (November-December 2025) Submit your research before last 3 days of December to publish your research paper in the issue of November-December.

A Comparative Study of Static and Dynamic Memory Allocation in Demonstrating them into Windows Subsystem Linux with C, Java, and Python

Author(s) Mr. Axl Robert Bon V. Vales
Country Philippines
Abstract Memory allocation is a fundamental aspect of program execution that directly influences performance, reliability, and resource utilization. This study presents a comparative analysis of static and dynamic memory allocation techniques across three widely used programming languages: C, Java, and Python. The research evaluates their behavior in real-world code scenarios through a series of benchmark tests measuring allocation time, memory consumption, and execution efficiency. To ensure a consistent and replicable testing environment, all C-based implementations and profiling were conducted using Windows Subsystem for Linux (WSL) running Ubuntu, providing native Linux compatibility within a Windows setup. Static allocation, typically associated with compile-time efficiency, is contrasted with dynamic allocation strategies that offer runtime flexibility but incur additional overhead. Using tools such as Valgrind, VisualVM, and Tracemalloc, empirical data were collected under controlled conditions. Results reveal that while static memory allocation generally offers faster access and lower memory footprint, dynamic allocation provides scalability and adaptability at the cost of increased runtime overhead. The study aims to guide developers and educators in selecting appropriate memory models depending on application requirements. Ultimately, this work contributes to a deeper understanding of memory behavior across different language paradigms, profiling tools, and execution environments including hybrid Windows–Linux systems.
Keywords memory allocation, static allocation, dynamic allocation, memory profiling, C, Java, Python, valgrind, visualvm, tracemalloc
Field Computer
Published In Volume 7, Issue 6, November-December 2025
Published On 2025-11-24
DOI https://doi.org/10.36948/ijfmr.2025.v07i06.57432
Short DOI https://doi.org/hbcbcc

Share this