# Memory layout of structs with mutable fields

**URL:** https://discourse.julialang.org/t/memory-layout-of-structs-with-mutable-fields/21400
**Category:** Performance
**Created:** [March 2, 2019, 7:21pm UTC](https://discourse.julialang.org/t/memory-layout-of-structs-with-mutable-fields/21400 "2019-03-02T19:21:30Z")
**Posts on this page:** 1
**Showing post:** 13

<div class="post-metadata">

### Author: ![sairus7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/sairus7/32/10816_2.png) [@sairus7](https://discourse.julialang.org/u/sairus7)
#### Post date: [March 3, 2019, 10:41am UTC](https://discourse.julialang.org/t/memory-layout-of-structs-with-mutable-fields/21400/13 "2019-03-03T10:41:11Z")

</div>

That’s because of mutability of each individual array element - you should be able to change it by its pointer. You can look here for mutability and contigious arrays: [Make immutable mutable again - or make arrays of structures stack-allocated](https://discourse.julialang.org/t/make-immutable-mutable-again-or-make-arrays-of-structures-stack-allocated/20800)

---

_[View the full topic](https://discourse.julialang.org/t/memory-layout-of-structs-with-mutable-fields/21400)._
