# shared memory - userdefined data structures

**URL:** <https://community.unix.com/t/shared-memory-userdefined-data-structures/247138>\
**Category:** Programming\
**Created:** [August 16, 2009, 4:03pm UTC](https://community.unix.com/t/shared-memory-userdefined-data-structures/247138 "2009-08-16T16:03:35Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![xyzt](https://community.unix.com/letter_avatar/xyzt/32/6_449c533f586939b6e5f246632a46421f.png) [@xyzt](https://community.unix.com/u/xyzt)\
**Post date:** [August 16, 2009, 4:03pm UTC](https://community.unix.com/t/shared-memory-userdefined-data-structures/247138/1 "2009-08-16T16:03:35Z")

</div>

Hello,

I wonder if I can write my userdefined data structures(ex: a list) to a shared memory segment?  
I know, the shm functions get (void\*) parameter so I should be able to read and write a list into the shared memory.  
may someone inform and clarify me about that, please?

---

<div class="post-metadata">

**Author:** ![fpmurphy](https://community.unix.com/user_avatar/community.unix.com/fpmurphy/32/110_2.png) [@fpmurphy](https://community.unix.com/u/fpmurphy)\
**Post date:** [August 16, 2009, 7:32pm UTC](https://community.unix.com/t/shared-memory-userdefined-data-structures/247138/2 "2009-08-16T19:32:20Z")

</div>

Yes you can write a list and/or data structure to shared memory.
