Currently most C++ compilers use vtables to realise polymorphism. The object (obj @ 0x614c20) contains a pointer to the vtable
Continue readingAuthor: max-sperling
Deleter – std::shared_ptr vs. std::unique_ptr
For the std::unique_ptr the deleter is part of the type and the std::shared_ptr keeps it as part of its control
Continue readingCustom allocator to track std::vector
Source code Debugging Result As soon as the std::vector runs out of memory its default allocator (std::allocator<T>) allocates a new
Continue readingTypes of mutexes and locks (C++)
Mutexes (Selection) … synchronizes the access on critical sections std::mutex Provides exclusive access (can only be pulled by one thread
Continue readingBuoyancy control – depth and time
Depth If you go down/up (descend/ascend) the gas spaces in your suit (dry or wet), your BCD and your body
Continue readingInter process synchronization (Linux)
Synchronizes the access on critical sections between processes. Prototypic lock file (with symlink) Alternative Boost has an interprocess namespace which
Continue readingPolicy-based routing (Linux)
Classic routing – Happens based on the destination address of the ip packet Classic routing tables $ ip rule list
Continue readingMath – Exercise 8 (Analysis)
Given Find All extremum of that function and their types. Solution Answer
Continue readingChemistry – Exercise 1 (Stoichiometry)
Given 10g of butane. Find The mass of carbon dioxide and water created during the combustion of the butane. Solution
Continue readingPhysics – Exercise 1 (Energy)
Given A ball is rolling down a hill on the earth without any friction and starts with a velocity of
Continue reading