Never been to DZone Snippets before?

Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS 

How to create a RAM disk on OS X

32768 = size in sectors (16MB in this case, a sector is 512 bytes)

$ hdid -nomount ram://32768
/dev/disk1
$ newfs_hfs /dev/disk1
$ mkdir /tmp/ramdisk1
$ mount -t hfs /dev/disk1 /tmp/ramdisk1


To unmount:

hdiutil detach /dev/disk1
« Newer Snippets
Older Snippets »
Showing 1-1 of 1 total  RSS