Made shared memory array dynamic.