ClassPackage: exclToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Object described on page has changed in 8.1. Moderate update since 8.1 release.
8.0 version

mapped-file-simple-stream

This simple-stream subclass is a subclass of both file-simple-stream and direct-simple-stream. Similar to file-simple-stream but opening a mapped file allows for much faster access to the file, with much less kernel overhead. Note: most operating systems do not allow the automatic extension of mapped files, so this class does not allow the extending operation either. Writes beyond the end of the file may cause an error.

A mapped file must be opened with :mapped t specified to open. The direction argument to open should be :input or :io. The file should have permissions consistent with the value specified to direction: if :input is specified, the file must be readable; if :io is specified, it must be both readable and writable.

After a mapped-file-simple-stream is opened, the excl::buffer slot contains an aligned pointer (see the section Aligned pointers in ftype.htm). This value can be used with any accessors that support aligned pointers, e.g. fslot-value-typed with an :aligned allocation.

The options when creating an instance of this class are:

See device-open for a description of the input-handle, output-handle, and mapped options.

For the offset and length arguments, no attempt is made to validate their values; they are passed to the underlying mapping implementation. Generally these arguments have some alignment requirements, but the specific requirements are up to the individual operating system. The offset argument is checked for alignment to at least natural-word alignment. This ensures that the final value for the buffer slot remains an aligned pointer.

See streams.htm for general information on simple-streams in Allegro CL.


Copyright (c) 1998-2009, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.1. The object described on this page has been modified in the 8.1 release; see the Release Notes.
Created 2007.4.30.

ToCDocOverviewCGDocRelNotesFAQIndexPermutedIndex
Allegro CL version 8.1
Object described on page has changed in 8.1. Moderate update since 8.1 release.
8.0 version