building ShareMemory fix bugs