In this chapter, we will step the reader through how to properly and safely perform C++-style memory management, while also adhering to the C++ Core Guidelines whenever possible, leveraging additions to the C++ standard template library in C++11, C++14, and C++17 to increase the safety, reliability, and stability of the reader's system program. We will start by first introducing the new() and delete() functions, and how they may be used to allocate type-safe memory, including aligned memory. Next, this chapter will discuss the safety issues with using new() and delete() directly and how these safety concern may be handled using smart pointers, including their impact on C++ Core Guideline compliance. How to perform memory mapping and permissions will also be discussed, with the chapter concluding with a brief discussion on fragmentation...
United States
Great Britain
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Singapore
Hungary
Ukraine
Luxembourg
Estonia
Lithuania
South Korea
Turkey
Switzerland
Colombia
Taiwan
Chile
Norway
Ecuador
Indonesia
New Zealand
Cyprus
Denmark
Finland
Poland
Malta
Czechia
Austria
Sweden
Italy
Egypt
Belgium
Portugal
Slovenia
Ireland
Romania
Greece
Argentina
Netherlands
Bulgaria
Latvia
South Africa
Malaysia
Japan
Slovakia
Philippines
Mexico
Thailand