Structure Padding Analysis Tools
One issue we always face is the fact that we don’t have enough memory. Ever. And even if we did, we like our data structures small and crunchy for performance reasons.
Sure, we pay attention to it all the time – and yet, occasionally, something slips through. So it’s nice that somebody wrote a tool – Cruncher# – to just load your PDB and examine all your structures for unnecessary padding.
And if you desire to look at ELF files (i.e. you’re under Linux, or working on a certain console), there’s pahole. Not only does it point out padding (or ‘holes in your structure’), it’s also friendly enough to tell you how many cache lines your structure will consume.
Let’s hope the two authors inspire each other!

Ooo. That’s actually pretty wicked. I’m going to give that a try on some of the tools I’ve written.
Ash
22 Oct 09 at 9:05 am
[...] read this note on Rachel’s blog and found out there’s tool similar to Cruncher, just for ELF, named [...]
Cruncher# update | .mischief.mayhem.soap.
1 Nov 09 at 9:24 am
you will have an ideal blog right here! would you wish to make some invite posts on my blog?
shops
14 May 13 at 6:45 pm