In C++
bock-type memory
If the number of element in a vector exceed the initial number a new bigger block of memory will be created. An all elements in the first vector are copied ot new one. The memory of old vector is freed.
The same applies to string
Coarse-grained Locking
Fine-grained Locking
Concurrent queue
- A Class to wrap the std::queue with a mutex
- Rule of Five
- Combine with condition variable
Thread pool
- A fixed-size container of thread objects
- std::thread::hardware_concurrency()