Rachels Lab Notes

Game Development as seen through the Blum Filter

Structure Padding Analysis Tools

with 3 comments

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!

Written by groby

October 22nd, 2009 at 8:19 am

Posted in Tool Time

3 Responses to 'Structure Padding Analysis Tools'

Subscribe to comments with RSS or TrackBack to 'Structure Padding Analysis Tools'.

  1. Ooo. That’s actually pretty wicked. I’m going to give that a try on some of the tools I’ve written.


    22 Oct 09 at 9:05 am

  2. [...] read this note on Rachel’s blog and found out there’s tool similar to Cruncher, just for ELF, named [...]

  3. you will have an ideal blog right here! would you wish to make some invite posts on my blog?


    14 May 13 at 6:45 pm

Leave a Reply