Is there a way map a portion of my memory to act like a directory on my hard drive with the exception that the data is not permanently stored. So for example, I save a file in /home/user/directory/filename.txt in gedit and it can be opened in nano. I do not need the files to be stored permanently and I need them to be quickly written and read.
|
|
||||
|
|
migrated from stackoverflow.com Aug 2 '10 at 14:34
|
Yes there is, it's called a ram-disk on Linux. There are two types: a raw block device that you can create, backed by memory, which allows you format it with any file system (e.g. ext3). The other type are file systems which automatically use RAM as a backing store, but are still fully capable of being mounted. Ram disks are usually available automatically on Linux as, and can be mounted and formatted just like a regular hard-disk:
And there are file systems that use RAM as a backing store:
|
|||
|
Yes, there is an in-memory filesystem called tmpfs. It is a completely normal filesystem, but each time Linux asks it to flush on the disk, in answers "wait just a little bit more" and Linux keeps caching. It is heavily used in Linux live CDs. |
||||
|
|
If you want this to take effect even after reboots, add an entry to your |
|||||||
|