strtonum(3) in FreeBSD?

Ryan Sommers ryans at gamersimpact.com
Sat Apr 16 06:51:07 PDT 2005


Thorsten Glaser wrote:
> SI and IEC 60027-2 say:
> 
> k = 1000
> M = 1000000
> m = 1/1000
> 
> K may so be 1024, but M may not, because M must be 1000000,
> always. SI prefices are the same among all units.

When talking about digital data storage K means times 2^10, M means 
times 2^20, G means 2^30 and T means 2^40.

1K = 1 * 2^10 bytes = 1024 bytes
1M = 1 * 2^20 bytes = 1048576 bytes
1G = 1 * 2^30 bytes = 1073741824 bytes

If you think otherwise go google "what is a megabyte". Didn't you ever 
wonder why your computer with 512 megabytes of ram always showed 
536870912 bytes? Or even hop on a FreeBSD box and do a:

dd if=/dev/random of=bigfile bs=1 count=1M

Watch as it reports "1048676 blocks in/out".

-- 
Ryan Sommers
ryans at gamersimpact.com


More information about the freebsd-current mailing list