add code demo for shared memory.