Better calculation of global storage size.