C add share memory change paiallel to serial