It's well known that inappropriate use of std::shared_ptr can lead to memory leak due to circular reference. In this article, a simple case where circular reference can happen on std::unique_ptr is demonstrated, and the method to avoid it is suggested.
A Simple Memory Leak Scenario with unique_ptr
Objects lifetime management is one of the critical elements in C++ development, but corresponding tools for debugging are rather scarce. This article described a non-invasive to track the invocation of ctors and dtors of classes in C++, which is enabled with the decorator pattern.
Track Lifetime of Objects in C++
Placement new is a rarely used feature in C++. This article gives a brief introduction to this feature, and shows how it can be helpful in the implementation of circular linked lists.
Circular Linked List and Placement new
Get the pin assignment of a board without destroying it.
a Non-invasive Way to Investigate IO Connections
The column index of a node in a complete binary tree encodes the path to reach it from the root. A simple and efficient encode/decode scheme can be made upon this result, and facilitate other algorithm implementations.
Path and Positional Encoding In a Binary Tree
The column index of a node in a complete binary tree encodes the path to reach it from the root. A simple and efficient encode/decode scheme can be made upon this result, and facilitate other algorithm implementations.
Path and Positional Encoding In a Binary Tree
Placement new is a rarely used feature in C++. This article gives a brief introduction to this feature, and shows how it can be helpful in the implementation of circular linked lists.
Circular Linked List and Placement new
Objects lifetime management is one of the critical elements in C++ development, but corresponding tools for debugging are rather scarce. This article described a non-invasive to track the invocation of ctors and dtors of classes in C++, which is enabled with the decorator pattern.
Track Lifetime of Objects in C++
Is it possible to take fine-grained control on a program after it being compiled? Directly manipulating the machine code in the binary can be an approach. As impractical as it sounds, this technique can be used to tackle real-world problems, as shown in this article.
Bypass Instructions in ELF with radare2
A brief summary to the GSoC-2022 Project - thrift for zephyr, which I have contributed to.
Review of My GSoC-2022 Project
Get the pin assignment of a board without destroying it.
a Non-invasive Way to Investigate IO Connections
Get the pin assignment of a board without destroying it.
a Non-invasive Way to Investigate IO Connections
Placement new is a rarely used feature in C++. This article gives a brief introduction to this feature, and shows how it can be helpful in the implementation of circular linked lists.
Circular Linked List and Placement new
Is it possible to take fine-grained control on a program after it being compiled? Directly manipulating the machine code in the binary can be an approach. As impractical as it sounds, this technique can be used to tackle real-world problems, as shown in this article.
Bypass Instructions in ELF with radare2
A brief summary to the GSoC-2022 Project - thrift for zephyr, which I have contributed to.
