Filesystem related system calls

Filesystem is an important subsystem of the linux kernel. I want to share this post to clarify and summarize some important filesystem concepts. Filesystem related system calls is the interface that kernel exposed to programmers to hide the complexity of VFS and the underneath file system. By understanding those system calls can help us know more details about what’s under the hood.

Read More

C++ NULL pointer

One of most important feature of C/C++ language is the low level, more precise control of the program, i.e. to manipulate the pointers. For address 0x0 we usually refer it as NULL pointer. In C we are familiar to use NULL which is a macro defined as below.

Read More

Comparison between c++11 copy and move

One core feature of C++ is the introduction of constructor and destructor. This helps the object life cycle management (we don’t need to malloc/free explicitly). One of the confusion I got is about copy and move constructor and assignemnt. This problem raised when I was working with the OpenCL to program on a heterogeneous system. OpenCL C++ bindings needs to manage abstract resouces (device, kernel, command queue, buffer, etc.). The resouces usually contain some memory structure, so it needs to be careful about the memory management.

Read More