test shareMemory