Corrections to shared memory and tests