Alright, I've had a look at sysdep.c, and it looks like bytes are divided by 1024 to convert to kilobytes. I've attached an updated patch using Juri's suggestion.