Memory management

Finding Performance Bottlenecks in Linux

There isn't a computer professional who, at some point, hasn't wondered whether their system(s) are slow due to legitimate load, or inefficiency. The beauty is there's no real reason to sit and wonder. In the case of Linux (and many other operating systems), all of the information you need is at your fingertips. You just have to know how to find it.

Anatomy of the Linux Slab Allocator

Good operating system performance depends in part on the operating system's ability to efficiently manage resources. In the old days, heap memory managers were the norm, but performance suffered due to fragmentation and the need for memory reclamation. Today, the Linux kernel uses a method that originated in Solaris but has been used in embedded systems for quite some time, allocating memory as objects based on their size.

Five Practical Memory Principles for Coding Programs

Your programs are more reliable and often faster when you code with careful memory techniques. Those advantages come at a low cost, too: the ideas behind the five tips presented below are simple enough to understand on a first reading. Start to practice them today, and you'll soon see pay-offs in the the applications or libraries you write.