simple example to use shared memory