Dear lazyweb: question about x86_64
Dear readers: why do programs map an extra 2 MB of memory between libraries in Linux 86_64? How can I get rid of that? I assume this costs me big time when scheduling tasks, since find_vma is the biggest kernel CPU user according to my oprofile reports.
July 26th, 2008 at 8:02
Just a wild guess here, but I would think the extra memory is due to the 64bit address space. Every register in a 64bit CPU is twice as big and also variables respectively are bigger (depending on your compiler) … I hope that helps (and I hope it is correct)
August 7th, 2008 at 6:38
Thanks for responding to my x86_64 bit question and indeed, the increased memory usage is due to 64 bit, but there’s something else — each library links in a 2MB and a 4KB page into RAM. Granted those pages are empty and as such do not need any sort of backing, BUT that costs me double the performance when context switching!
August 7th, 2008 at 9:19
You are welcome.
Sorry for not being more help - I have no idea why libraries would link in extra memory space. What you are saying is spot on.