DZone 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
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






Comments
Snippets Manager replied on Tue, 2008/06/17 - 7:55pm
Snippets Manager replied on Mon, 2007/04/23 - 8:32am