C++ for Quantitative Finance: Hands-On - Memory Management
Memory Management
Dynamic Memory Allocation
Malloc Function
New Operator
New [] Operator
2D Arrays
In modern C++, avoid raw new and delete. Prefer stack allocation and RAII with smart pointers (std::unique_ptr, std::shared_ptr) for safe and automatic memory management.
Memory Areas
- Stack
- Head
- data section
Functions for allocatin memory
Fron Heap
