Joy of Programming: Understanding Bit-fields in C
One important feature that distinguishes C as a systems programming language is its support for bit-fields. Let us explore this feature in this column. In C, structure members can be specified with size…
Getting Started with SystemTap
If programming is an art, then debugging is even more so. To be a good programmer, one must master debugging. We have seen some good methods of kernel debugging, e.g., gdb, kgdb, kprobes,…
Loading Library Files in C++
This article demonstrates how to load shared or dynamic library files in programs written in C++, which is not as straightforward as in C. Device drivers and library files have always been associated…
Joy of Programming: The Legacy of C
Dennis Ritchie died on the 8th of October 2011, at the age of 70. His lasting contributions to computing include creating the C language, and co-creating the UNIX operating system. In his memory,…
CodeSport (November 2011)
In this month’s column, we will continue our discussion on some of the common loop optimisations performed by the compiler. In last month’s column, I had presented a coding snippet (shown below) and…
Joy of Programming: Scope, Lifetime and Visibility in C
Often, programmers confuse the scope, lifetime and visibility of variables. So I’ll cover these three important concepts in this month’s column. Whenever you declare a variable, you determine its scope, lifetime and visibility….
CodeSport (October 2011)
In this month’s column, let us focus our attention on some of the common compiler optimisations, and on how to write code that can be well optimised by the compiler. In last month’s…
Modify-function-return-value hack! — Part 2
In my previous article on this topic, we discussed some guidelines on how to write a secure application in C. The article focused on functions defined in the application itself. Now, we will…






