# C Structure Padding Initialization | Interrupt

**URL:** <https://community.memfault.com/t/c-structure-padding-initialization-interrupt/532>\
**Category:** Blog\
**Created:** [March 2, 2022, 6:57pm UTC](https://community.memfault.com/t/c-structure-padding-initialization-interrupt/532 "2022-03-02T18:57:02Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![Phil](https://avatars.discourse-cdn.com/v4/letter/p/e95f7d/32.png) [@Phil](https://community.memfault.com/u/Phil)\
**Post date:** [March 3, 2022, 1:49pm UTC](https://community.memfault.com/t/c-structure-padding-initialization-interrupt/532/2 "2022-03-03T13:49:07Z")

</div>

A great article. For an optimized and/or secure system, it’s important to pay attention to these small details of how things look in memory.

However, I can’t believe I didn’t know about the `pahole` tool - I’ve been manually inserting those offset comments when optimizing…

I recently wrote an article about a similar topic - and one thing I wrote about is what unaligned accesses look like in memory and why they are bad or simply not allowed:

[http://www.shincbm.com/embedded/2022/02/18/struct-layout-code-size.html](http://www.shincbm.com/embedded/2022/02/18/struct-layout-code-size.html)

---

_[View the full topic](https://community.memfault.com/t/c-structure-padding-initialization-interrupt/532)._
