# Develop driver for access shared memory

**URL:** <https://forum.inductiveautomation.com/t/develop-driver-for-access-shared-memory/5257>\
**Category:** Module Development\
**Created:** [October 10, 2012, 2:48pm UTC](https://forum.inductiveautomation.com/t/develop-driver-for-access-shared-memory/5257 "2012-10-10T14:48:18Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![davide.paris87](https://avatars.discourse-cdn.com/v4/letter/d/df788c/32.png) [@davide.paris87](https://forum.inductiveautomation.com/u/davide.paris87)\
**Post date:** [October 10, 2012, 2:48pm UTC](https://forum.inductiveautomation.com/t/develop-driver-for-access-shared-memory/5257/1 "2012-10-10T14:48:18Z")

</div>

Hi,  
I need a driver to connect OPC-UA server with the linux’s shared memory. I have no idea where to start. Could someone help me?

thanks, David

---

<div class="post-metadata">

**Author:** ![Kevin.Herron](https://sea1.discourse-cdn.com/inductiveautomation/user_avatar/forum.inductiveautomation.com/kevin.herron/32/7259_2.png) [@Kevin.Herron](https://forum.inductiveautomation.com/u/Kevin.Herron)\
**Post date:** [October 10, 2012, 3:13pm UTC](https://forum.inductiveautomation.com/t/develop-driver-for-access-shared-memory/5257/2 "2012-10-10T15:13:26Z")

</div>

Start with figuring out how or if you even can read from shared memory on Linux using Java. If you can get that working then worry about how to make a driver for our OPC-UA server.

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [October 10, 2012, 4:37pm UTC](https://forum.inductiveautomation.com/t/develop-driver-for-access-shared-memory/5257/3 "2012-10-10T16:37:43Z")

</div>

Your best approach might be to make a wrapper in C that reads/writes the shared memory and translates that to messages that the Java module is listening to/for on a socket.

Accessing shared memory directly from Java goes against the basic philosophy of Java of protecting the developer from all the messy underlying details that they tend to get wrong like malloc() and free().

(I’m not a Java developer so I could be wrong here but I’d still be really surprised if you can do it directly from Java)

---

<div class="post-metadata">

**Author:** ![Robert](https://avatars.discourse-cdn.com/v4/letter/r/e95f7d/32.png) [@Robert](https://forum.inductiveautomation.com/u/Robert)\
**Post date:** [October 10, 2012, 5:20pm UTC](https://forum.inductiveautomation.com/t/develop-driver-for-access-shared-memory/5257/4 "2012-10-10T17:20:52Z")

</div>

My Java developer thinks there might be hope for you [here](http://onjava.com/pub/a/onjava/2002/10/02/javanio.html?page=3).
