top memory explained

October 25, 2012

Reading time ~1 minute

From time to time I ask myself what the different memory columns in top mean. There are three of them in a regular GNU/Linux environment; VIRT, RES & SHR:

So I figured I should write it down:

VIRT

The following is counted when calculating VIRT:

  • Application code
  • Application data
  • Shared libraries
  • Swap usage

RES

The following is counted when calculating RES:

  • The non-swapped physical memory a task has used

Note that RES is not CODE + DATA (for details see http://stackoverflow.com/questions/7594548/res-code-data-in-the-output-information-of-the-top-command-why).

SHR

This is the memory a task potentially has shared with other tasks.

Running vim-airline with Maximum Awesome

I use [Maximum Awesome](https://github.com/square/maximum-awesome) when I code in [vim](http://www.vim.org/), it's a great starting place...… Continue reading

Quicksort implementation in Python

Published on August 04, 2014

Fibonacci generator in Python

Published on August 04, 2014