This question already has an answer here:

To convert the readings in /proc/meminfo from "kB" to bytes, should I multiply by 1024, or 1000?

share|improve this question

marked as duplicate by cuonglm, muru, don_crissti, taliezin, Ramesh Feb 17 '16 at 17:34

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

    
1024 (one thousand twenty four). – kba Feb 17 '16 at 16:30
    
muru - How is this a duplicate? I already know /proc/meminfo always uses kB – horse hair Feb 17 '16 at 17:20
1  
And this question is for /proc/meminfo not /proc/[pid]/status... – olejorgenb Feb 3 '17 at 3:43

One convention used to differentiate base 2 and base 10 representations for writing Kilobyte is using upper case K and lower case k respectively. Hence, conversion becomes:

1 KB = 1024 bytes  
1 kB = 1000 bytes

The kernel, however, uses a buddy system with power-of-two sizes. Hence, appropriate conversion becomes multiplying by 1024.

Here are some links for more information: Kernel memory handling

share|improve this answer
1  
That maybe true for other places, but the kernel calls 1024 bytes kB and KB somewhat indiscriminately. – muru Feb 17 '16 at 16:50
    
You are right. And I made an edit above to fix it. – Alexander Maru Feb 17 '16 at 17:02

Not the answer you're looking for? Browse other questions tagged or ask your own question.