4

I tried this command to create a ramdisk

sudo hdik -nomount ram://4194304

but it failed with the message hdik: attach failed: error 0x6e = 110

It works only if I decrease the size to about 1 GB. Is there any ramdisk limit in OS X or did I miss something?

Using Mac OS X Mountain Lion with 8 GB RAM.

1 Answer 1

6
+25

It seems there's some kind of limitation when using hdik. You can try using hdiutil to create the ramdisk.

diskutil erasevolume HFS+ "ram disk" `hdiutil attach -nomount ram://4194304`
1
  • Thanks, it works. Maybe one question more. Once the ram disk is created and populated with data, the diskimage-helper process in the Activity Monitor shows more or less the memory usage of ramdisk. Since I use ramdisk as temporary file location, the temporary files are regularly cleaned up. Why does the diskimage-helper however still show the maximal memory usage? Is there any way to "free" the memory hold by diskimage-helper without unmounting it?
    – elgcom
    Aug 22, 2012 at 21:00

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .