Mailing Lists: Apple Mailing Lists
Image of Mac OS face in stamp
Re: tmpfs in Darwin?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tmpfs in Darwin?



On Sunday, Sep 12, 2004, at 03:51 Australia/Sydney, Micke Moggia wrote:

Hi all!

Have just discovered the filesystem tmpfs in Linux. It works like a RAM disk but better. Se this article:
http://www-106.ibm.com/developerworks/library/l-fs3.html


I have thousands and thousand of small cache files that I don't want to be written to the disk, and if I create a traditional RAM disk in OS X there is a lot of overhead, cause the filesystem will cache all files twice.

Does anyone know if there is a tmpfs-like filesystem for OS X?

Slightly OT, since I believe these tools don't exist in Darwin... Checkout the manpage for hdid(8):

              hdid -nomount ram://<sectors>

       will attach a ram disk that can be mounted and used  after
       being  formatted with a newfs utility or Disk Utility.app.
       A sector is 512 bytes.

       A small shell script to create and mount a ram disk:

              #!/bin/sh

              NUMSECTORS=128000
              mydev=`hdid -nomount ram://$NUMSECTORS`
              newfs_hfs $mydev
              mkdir /tmp/mymount
              mount -t hfs $mydev /tmp/mymount

Cheers,
--
stix

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-kernel mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden


References: 
 >tmpfs in Darwin? (From: Micke Moggia <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2011 Apple Inc. All rights reserved.