fix ShareMemory some bug