fn flush_shared_memory(shared_memory: &SharedMemory) -> Result<()>