In Chapter 7, A Comprehensive Look at Memory Management, we learned how to allocate and deallocate memory using C++-specific techniques, including the use of std::unique_ptr and std::shared_ptr. In addition, we learned about fragmentation and how it is capable of wasting large amounts of memory depending on how memory is allocated and then later deallocated. System programmers often have to allocate memory from different pools (sometimes originating from different sources), and handle fragmentation to prevent the system from running out of memory during operation. This is especially true for embedded programmers. Placement new() may be used to solve these types of issues, but implementations based on placement new are often hard to create and even harder to maintain. Placement new() is also only accessible from user-defined code, providing no...
United States
United Kingdom
India
Germany
France
Canada
Russia
Spain
Brazil
Australia
Argentina
Austria
Belgium
Bulgaria
Chile
Colombia
Cyprus
Czechia
Denmark
Ecuador
Egypt
Estonia
Finland
Greece
Hungary
Indonesia
Ireland
Italy
Japan
Latvia
Lithuania
Luxembourg
Malaysia
Malta
Mexico
Netherlands
New Zealand
Norway
Philippines
Poland
Portugal
Romania
Singapore
Slovakia
Slovenia
South Africa
South Korea
Sweden
Switzerland
Taiwan
Thailand
Turkey
Ukraine