i-nodes and hard links Unix-like operating systems store file information in a data structure called i-node table. File names are just a way to reference an i-node and the same i-node may be referenced by more than one name. These associations between file names and i-nodes are called hard links. When a file is deleted, …
Tag: c
Testing the limits of your application
When we first learn to program, we are taught to be mindful of the computer’s resources; they must be used sparingly and released as soon as possible. So you know the drill: close files, release database connections, close sockets, free memory, etc. But have you ever wondered who sets the limits of what can be …
Read the full post →“Testing the limits of your application”
This would not happen with Java
One of the main differences between C and Java is the capability of C to perform low-level memory operations. This allows for great power and flexibility but is also a constant source of bugs. In that sense, Java is considered a safer programming language. This post presents some examples in C that would not happen …
How to create a sparse file
Sparse files are files with “holes”. File holes do not take up any physical space as the file system does not allocate any disk blocks for a hole until data is written into it. Reading a hole returns a null byte. An example of sparse files is virtual machine images. For instance, when I create …