Skip to main content
WinFsp-MemFs-Extended provides several configuration options to customize how your RAM disk behaves. These options are specified as command-line flags when starting the filesystem.

Filesystem modes

WinFsp-MemFs-Extended operates in two distinct modes depending on how you configure it:

Disk mode

Disk mode is the default mode when you specify a mount point using the -m flag. In this mode, the RAM disk appears as a local drive letter.
memefs -s 1073741824 -m R:
Requirements:
  • Must specify a mount point with -m
  • Cannot be used simultaneously with UNC prefix mode

Network mode

Network mode is activated when you specify a UNC prefix using the -u flag. In this mode, the RAM disk appears as a network share.
memefs -s 1073741824 -u \\Server\\RamShare
Requirements:
  • Must specify a UNC prefix with -u
  • Cannot be used simultaneously with disk mode

Case sensitivity

By default, WinFsp-MemFs-Extended uses case-sensitive file matching, similar to Linux filesystems. This means File.txt and file.txt are treated as different files.

Enabling case insensitivity

To make the filesystem case-insensitive (like standard Windows NTFS), use the -i flag:
memefs -s 1073741824 -m R: -i
With this option enabled:
  • README.txt, readme.txt, and ReadMe.txt all refer to the same file
  • File operations match the behavior of typical Windows applications
  • Recommended for general Windows use

Cache and flush behavior

WinFsp-MemFs-Extended can be configured to control how file system caches are managed.

Flush and purge on cleanup

The -f flag enables automatic flushing and purging of the file system cache when files are closed:
memefs -s 1073741824 -m R: -f
When enabled:
  • File buffers are immediately flushed when files are closed
  • Cache entries are purged on cleanup
  • Ensures data consistency at the cost of potential performance
  • Useful for applications that require strict data integrity
Trade-offs:
  • Increased data integrity
  • Potential performance impact for frequent file operations
  • May reduce effective cache utilization

File info timeout

The file information timeout is set to 0 by default (previously was INFINITE in the original memfs). This controls how long file metadata is cached before being refreshed. This value is currently hardcoded in the source code at main.cpp:58 and cannot be changed via command-line flags.

Volume properties

Volume label

You can assign a friendly name to your RAM disk using the -l flag:
memefs -s 1073741824 -m R: -l "Temp Storage"
The volume label:
  • Appears in File Explorer
  • Shows in disk management tools
  • Helps identify the purpose of the RAM disk
  • Supports spaces and special characters (use quotes)

File system name

The -F flag allows you to specify what file system type Windows should report:
memefs -s 1073741824 -m R: -F NTFS
Common values:
  • NTFS - Reports as NTFS (recommended for compatibility)
  • FAT32 - Reports as FAT32
  • Custom values are supported
This is primarily cosmetic and affects:
  • System information displays
  • Some application compatibility checks
  • File system feature detection by certain tools

Security configuration

You can configure root directory permissions using Security Descriptor Definition Language (SDDL) with the -S flag.

SDDL syntax

memefs -s 1073741824 -m R: -S "D:P(A;;FA;;;WD)"
Important limitations:
  • Use file rights only: FA (File All Access), FR (File Read), etc.
  • Generic rights like GA (Generic All) are NOT supported
  • The SDDL string defines access control for the root directory

Common SDDL examples

# Full access for everyone
-S "D:P(A;;FA;;;WD)"

# Read-only for everyone
-S "D:P(A;;FR;;;WD)"

Maximum filesystem size

The -s flag is required and specifies the maximum amount of memory the RAM disk can use:
memefs -s 2147483648 -m R:  # 2GB
memefs -s 0x100000000 -m R:  # 4GB (hexadecimal)
Considerations:
  • Specified in bytes
  • Accepts decimal or hexadecimal (0x prefix) notation
  • Must not exceed available system RAM
  • Memory is allocated dynamically as files are created
  • Exceeding this limit will result in out-of-space errors

Example configurations

Development RAM disk

Case-insensitive, NTFS-compatible, 4GB:
memefs -s 4294967296 -m R: -i -F NTFS -l "Dev Cache"

High-integrity temporary storage

With flush-and-purge enabled:
memefs -s 1073741824 -m T: -f -l "Secure Temp"

Network-accessible RAM share

Case-insensitive network mode:
memefs -s 2147483648 -u \\LocalHost\\RamCache -i -l Ram

Build docs developers (and LLMs) love