Southsouth
Southsouth

Reputation: 2695

Must -read articles for C++ memory mangement

After reading "C++ Memory Management: From Fear to Triumph" series, I think they are must-read articles for memory management. I'd like to know what else must-read articles I shouldn't miss.

Thanks!

Upvotes: 8

Views: 744

Answers (6)

zerocukor287
zerocukor287

Reputation: 1042

More than a decade passed since the original question, but us, C++ developers still not a master of memory management.

Google recently published an article about memory safety. It lists some approaches that can help make an existing codebase safer.

For example,

Enforcing definite initialization or disallowing pointer arithmetic

Similarly, adding lifetimes to C++ will improve interoperability

Also mentions two interesting ideas, MTE (Memory tagging extension) and CHERI (Capability Hardware Enhanced RISC Instructions).

Upvotes: 0

Alexander Poluektov
Alexander Poluektov

Reputation: 8063

Andrei Alexandrescu has also something to say in his Modern C++ Design Book. You'd probably interested in

  • Chapter 4. Small-Object Allocation
  • Chapter 7. Smart Pointers

Despite the fact that practical value of Andrei's techniques considered controversial, you definitely will learn some new and interesting stuff from this book.

Upvotes: 0

mloskot
mloskot

Reputation: 38912

Read and learn well about RAII idiom, Resource Acquisition Is Initialization from articles like the two below:

Upvotes: 3

user257666
user257666

Reputation:

Some basics:

Memory as a Programming Concept in C and C++

Frantisek Franek

Cambridge University Press

ISBN 0-521-52043-6

Upvotes: 1

Jagannath
Jagannath

Reputation: 4025

Herb sutter's treatment on Memory Management in his books "Exceptional C++" and "More Exceptional C++".

Upvotes: 4

Stefan Arentz
Stefan Arentz

Reputation: 34945

Although not really an article, I think the Boost smart_ptr library documentation has some good information on C++ memory management. It is of course biased to the Boost library but I think you will get some good ideas out of it.

Upvotes: 1

Related Questions