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!
The C programming language provides several functions for memory allocation and management. These functions can be found in the <stdlib. h> header file.
What are the 3 areas of memory management? Memory management operates at three levels: hardware, operating system and program/application. The management capabilities at each level work together to optimize memory availability and efficiency. Memory management at the hardware level.
There are 4 library functions provided by C defined under <stdlib.h> header file to facilitate dynamic memory allocation in C programming. They are: malloc() calloc()
You have to free() the allocated memory in exact reverse order of how it was allocated using malloc() . Note that You should free the memory only after you are done with your usage of the allocated pointers.
Herb sutter's treatment on Memory Management in his books "Exceptional C++" and "More Exceptional C++".
Read and learn well about RAII idiom, Resource Acquisition Is Initialization from articles like the two below:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With