Product Documentation

FairCom ISAM for C

Previous Topic

Next Topic

Memory Files

The FairCom Server supports pure memory-resident data and index files. The distinguishing characteristic of memory files is that they exist solely in memory, occupying their own memory space separate from the data and index caches.

Memory files satisfy the need for the creation and manipulation of temporary data or index files that are always memory resident and never touch disk. Contrast this with non-memory files, whose contents may be paged out of the database cache and written to disk. Memory files are ideal for true temporary files: they can exist in memory as long as the FairCom Server or c-tree application process is running.

Some applications of memory files include:

  • Temporary files: Temporary files can be created as memory data or index files. The file contents are always memory resident, and when the memory file is finally closed, it ceases to exist.
  • Storing read-only file contents: At server or application startup, the contents of a disk file can be read into a memory file and subsequent read requests can be satisfied from the memory file.
  • In-memory list management: Applications frequently need to maintain in-memory lists. A memory index provides easy creation and manipulation of items in a B+-tree-indexed list using the c-tree API, rather than requiring the developer to implement custom list management routines.

Using Memory Files

The main operational differences between memory files and non-memory files involve creating and closing the files. After memory files are created, they are accessed using the standard c-tree API functions, just as non-memory files.

Memory files are available in single user standalone and server models. It is not a feature included in multiuser standalone (FPUTFGET) models as memory files cannot be shared in that model. For multi-user applications requiring a linked library model, we recommend the server DLL which is the server library linked to your application process space. This provides a multi-threaded multi-user library with all server features. API calls are directly through the stack for extreme performance. This model is ideal for application server type applications.

In This Chapter

HUGE File Support

Creating Memory Files Using Server Configuration Keyword

Creating Memory Files Programmatically

Sharing Memory Files Created Programmatically

Collecting Memory File Statistics

Memory File Limitations

Tip: Faster Server Shutdown with Memory Files

TOCIndex