Adjustments System V shared memory

Some little adjustments to System V shared memory sample.
Thank you Thiago Klock for the tips! :)