C++ is a well-known programming language which focuses on effective hardware utilization. C++ compilers are able to generate efficient executable code that takes advantage of the hardware elements. C++ supports the object-oriented paradigm and therefore it provides classes and structs. Compilers are enabled to add extra padding and alignment bytes between the members of a class. This option may result in different size of a class based on the different order of the class and contradicts the optimal memory consumption demand. In this paper, we propose an approach for optimizing memory utilization. This approach includes a static analysis tool that examines the classes and reports if the order of members is sub- optimal regarding memory consumption. We analyze open source projects and realize every observed project contains such a subtle problem.
|preprint paper (icooolps2022-preprint-paper-babati.pdf)||544KiB|
Tue 7 JunDisplayed time zone: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna change
13:30 - 15:00
|Memory Consumption of Objects in C++|
Bence Babati Eötvös Loránd University, Faculty of Informatics, Department of Programming Languages and Compilers, Norbert Pataki Eötvös Loránd University, Faculty of Informatics, Department of Programming Languages and CompilersFile Attached
Saam Barati Apple