Archive | August, 2011

Understanding “vmalloc region overlap”

I recently came across the following disconcerting message in my kernel’s boot output:

Truncating RAM at 40000000-5fffffff to -57ffffff (vmalloc region overlap).
Kernel command line: console=ttySC0,115200 mem=512M
Memory: 384MB = 384MB total

Which is the kernel’s way of saying “I understand there may be some RAM here – but I’m not going to use it all”. So what is the cause of this warning? And what do we need to do to reclaim that lost RAM?

Continue Reading →

A nasty string initialization bug in C

Today I encountered a bug that was quite difficult to find regarding strings. In order for strings to work they must be null-terminated, and this implies that an array of characters can contain a string with a length equal to the array size minus one, because there must be space for the null character. I found out that, when initializing array of chars with strings, the compiler does not complain if just the null character doesn’t fit.

Continue Reading → embraces Twitter! embraces Twitter embraces Twitter has joined Twitter! I thought it would be a great way to get to know my readers and to share with you the blog posts I write.

When it comes to developing for embedded devices – it can be quite difficult to find good documentation or informative articles on the things we really need to know. I’m hoping that we can use Twitter to share links to the useful nuggets of information that we come across during our travels across the internet.

I will look forward to seeing you on Twitter! [© 2011]

Continue Reading →