fixed compilation
fixed crashes due to max cash size computation (triggered on 8GB RAM)
pull of the bugfixing changes from vladrich
fixed a bug in computation of bits_per_var_diff
final changes to fix the bug on 32bit PAE systems with more than 8GB of RAM