initialize shared memory in linear kernel