objsize is a small OCaml library for computing size of OCaml values. It computes count of words used for values, count of values’ headers, maximal depth of values. There are functions to get size of values in bytes too.