Skip to content

About

This repository contains information about some beautiful and surprising features of Linux kernel.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 

Repository files navigation

Linux

It made mouse, a luxury item.

The NULL Macro

In Linux, NULL is a macro which is defined as:

#define NULL (void *)0

And that is why it is said to initialize every pointer to NULL, so that you can get seg-fault :) [by accessing virtual address 0] in case of blind access.

Linked List Beauty

  1. The way generic Linked List is created with the help of container_of macro. The code for this macro is used to calculate the base address of any custom-made Linked List (Smartest 1-line code encountered so far).

  2. There could be many reasons (some simpler and some software engineering related) to create a generic Linked List kernel data structure. Out of all this reasons, one reason, which I have recently encountered (Thanks to CRIU), could be:
    The functions like list_add, list_del and others do not perform any memory allocation or deallocation (opposed to what we learn in our data structure classes). It just perform pointer manipulations. You could say "Yeah I know. Whats big deal in that?". It become crucial when you are maintaining (feature addition, refactoring, reusebility) applications/ drivers.

OS: The Born Manager

Its ever evolving isolation mechanism:

  • From process to threads, to virtual machines (hypervisors), to containers (cgroups and namespaces).

About

This repository contains information about some beautiful and surprising features of Linux kernel.

Topics

Resources

Stars

0 stars

Watchers

2 watching

Forks

Releases

Packages

Contributors