shared mem test (unfortunately also works for non shared mem