0

RAM disk can be created in command line with different commands on different operating systems.
For example, to create a RAM disk of 512MB ---

On macOS:

diskutil eraseVolume HFS+ "RAMDisk" `hdiutil attach -nomount ram://1048576`

On Ubuntu:

mkdir /mnt/ramdisk
mount -t tmpfs -o size=512m tmpfs /mnt/ramdisk

Is there any cross-platform method/way to create a RAM disk in Golang?

Vej
  • 378
  • 1
  • 6
  • 24

0 Answers0