Documentation

C and C++ ISAM Programmers Guide

Previous Topic

Next Topic

Memory Files

The c-treeACE 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 c-treeACE 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.

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