Bypassing Memory Leak in Modern C++ Realm

Papp, Dorottya, Pataki, Norbert (2018) Bypassing Memory Leak in Modern C++ Realm Annales Mathematicae et Informaticae. 48. pp. 43-50. ISSN 1787-5021 (Print), 1787-6117 (Online)

[img] pdf

Download (380kB)

Absztrakt (kivonat)

Deallocation of dynamically allocated memory belongs to the responsibil- ity of programmers in the C and C++ programming languages. However, compilers do not support the work of the programmers with error or warning diagnostics. Thus the result of this behaviour can be memory leak. Programs’ memory consumption may be unreasonably big and even the operating system can be too slow because of the swapping. We present some different scenarios when memory leak occurs. We show the root cause of the scenarios. This paper presents existing tools for detecting or avoiding memory leak. These tools work in different ways. We analyze the smart pointers of C++11 standard, Valgrind that is a run-time heap profiler, Hans Boehm’s garbage collector and the Clang Static Analyzer. We present the pros and cons of the tools. We analyse how difficult it to use these tools, how the efficiency is affected and how these tools can be enhanced for overcome unwanted memory leak. We present our proposals to make the tools more effective.

Mű típusa: Folyóiratcikk
Szerző neveMTMT azonosítóORCID azonosítóKözreműködés
Megjegyzés: Selected papers of the 10th International Conference on Applied Informatics
Kapcsolódó URL-ek:
Kulcsszavak: C++, smart pointers, memory leak, garbage collection
Nyelv: angol
Kötetszám: 48.
ISSN: 1787-5021 (Print), 1787-6117 (Online)
Felhasználó: Tibor Gál
Dátum: 13 Már 2019 18:50
Utolsó módosítás: 13 Már 2019 18:50
Műveletek (bejelentkezés szükséges)
Tétel nézet Tétel nézet