| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |
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-2012, Franz Inc. Oakland, CA., USA. All rights reserved.
Documentation for Allegro CL version 8.2. This page was not revised from the 8.1 page.
Created 2010.1.21.
| Allegro CL version 8.2 Unrevised from 8.1 to 8.2. 8.1 version |