Skip to content

Help: Clarify cmake_host_system_information memory units

The memory size query implementations report in units of one mebibyte (2^20). Clarify the unit in the documentation because "megabyte" might also be interpreted as 10^6.

One mebibyte is 1024 * 1024 One megabyte is 1000 * 1000

Various lines at https://gitlab.kitware.com/cmake/cmake/blob/master/Source/kwsys/SystemInformation.cxx

And the line in the kernel at https://github.com/torvalds/linux/blob/360bd62dc4943a0754e6cb5637e01b5b43143cfc/fs/proc/meminfo.c#L30

Indicate the use of 1024 instead of 1000 when calculating the sizes.

Edited by Brad King

Merge request reports