Mac Share Memory 发表于 2018-12-05 | 分类于 Mac , Solution hdiutilExample创建一个1024MB的ramdisk 12345678910111213141516# 返回一个ramdisk路径,假设返回的路径是 /dev/disk3# hdiutil attach -nomount ram://$((2 * 1024 * SIZE_IN_MB))hdiutil attach -nomount ram://$((2 * 1024 * 1024))# 格式化# diskutil eraseVolume HFS+ RAMDisk NAME_OF_DISK# 访问路径:/Volumes/RAMDiskdiskutil eraseVolume HFS+ RAMDisk /dev/disk3# 命令执行输出样例# Started erase on disk3# Unmounting disk# Erasing# Initialized /dev/rdisk3 as a 1024 MB case-insensitive HFS Plus volume# Mounting disk# Finished erase on disk3 RAMDisk