One of my pet hates is developers messing up units of memory. In general, the difference doesn't matter much, or you can work out what they meant to say, but it does annoy me when developers who should know better appear to be confused about what they are trying to say.
From Wikipedia's Byte page, here is a cheat sheet of units
"b" means bits
"B" means bytes
"k" or kilo- is standard prefix meaning 1000
"K" or "Ki", sometimes called kibi- is 1024
"m" or mill-, means 1/1000th
"M" or mega-, means 1000^2
"Mi" or mebi-, means 1024^2
|milli-bits||1/8000th of a byte|
|milli-bytes||1/1000th of a byte|
Kb or Kib
KB or KiB
What annoys me is when professionals confuse these terms.
In top on Unix it states
KiB Mem: 32893900
but when I do "head -1 /proc/meminfo" it states
MemTotal: 32893900 kB
this is 2.4% less.
I suspect top is correct as it is closer the amount of memory installed and they used "KiB" which lends credibility, but I can't be sure.
In the JVM
The default translation for "KBYTES" is "kbytes" but in Japanese and Chinese it is "KB" which is 2.4% more.
While the JVM appears to be using KiB or kibibytes every where, it refers to "KiB" only three times, but uses "kB" in twice, "Kb" in seven places, "KB" in 127 places and "kilobytes" in three cases.
Similarly "MiB" appears 4 times, "MB" in 87 places, "Mb" three times and "mb" three times.
If you don't know what units you have in mind and which ones you don't, it shouldn't be surprising if someone reading your output is confused as well.
I encourage everyone to use standard units in their code so when you see units you know exactly what they mean.