The trivial-mmap Reference Manual

This is the trivial-mmap Reference Manual, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Dec 15 07:56:40 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 trivial-mmap

A library providing an easy-to-use API for working with memory-mapped files.

Author

Smith Dhumbumroong <>

License

Public Domain

Dependencies
  • alexandria (system).
  • osicat (system).
Source

trivial-mmap.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 trivial-mmap/trivial-mmap.asd

Source

trivial-mmap.asd.

Parent Component

trivial-mmap (system).

ASDF Systems

trivial-mmap.


3.1.2 trivial-mmap/package.lisp

Source

trivial-mmap.asd.

Parent Component

trivial-mmap (system).

Packages

trivial-mmap.


3.1.3 trivial-mmap/low-level-interface.lisp

Dependency

package.lisp (file).

Source

trivial-mmap.asd.

Parent Component

trivial-mmap (system).

Internals

3.1.4 trivial-mmap/trivial-mmap.lisp

Dependency

low-level-interface.lisp (file).

Source

trivial-mmap.asd.

Parent Component

trivial-mmap (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 trivial-mmap

Source

package.lisp.

Use List

common-lisp.

Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Macros

Macro: with-mmap-file ((mmapped-file filename) &body body)
Package

trivial-mmap.

Source

trivial-mmap.lisp.


5.1.2 Ordinary functions

Function: mmap-file (filename)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Function: mmap-read-byte (mmapped-file &optional eof-value)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Function: mmap-read-char (mmapped-file &optional eof-value)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Reader: mmapped-file-offset (instance)
Writer: (setf mmapped-file-offset) (instance)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Target Slot

offset.

Function: mmapped-file-p (object)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Reader: mmapped-file-pointer (instance)
Writer: (setf mmapped-file-pointer) (instance)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Target Slot

pointer.

Reader: mmapped-file-size (instance)
Writer: (setf mmapped-file-size) (instance)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Target Slot

size.

Function: munmap-file (mmapped-file)
Package

trivial-mmap.

Source

trivial-mmap.lisp.


5.2 Internals


5.2.1 Macros

Macro: %with-mmap-file ((pointer-to-mmap-file file-size filename &key file-length mapping-type offset) &body body)

Uses MMAP-FILE to maps a FILENAME into memory.

POINTER-TO-MMAP-FILE and FILE-SIZE are bound to values that MMAP-FILE returns after we apply it to FILENAME.

Package

trivial-mmap.

Source

low-level-interface.lisp.


5.2.2 Ordinary functions

Function: %mmap-file (filename &key file-length mapping-type offset)

Maps a FILENAME into memory.

Package

trivial-mmap.

Source

low-level-interface.lisp.

Function: %mmap-read-byte (pointer-to-mmap-file offset)

Reads and returns one byte from a memory-mapped file pointed to by the POINTER-TO-MMAP-FILE pointer, offset by OFFSET bytes.

Package

trivial-mmap.

Source

low-level-interface.lisp.

Function: %mmap-read-char (pointer-to-mmap-file offset)

Reads and returns a character from a memory-mapped file pointed to by the POINTER-TO-MMAP-FILE pointer, offset by OFFSET bytes.

Package

trivial-mmap.

Source

low-level-interface.lisp.

Function: %munmap-file (pointer-to-mmap-file file-size)

Removes a mapping at the address (with the range of FILE-SIZE) that the POINTER-TO-MMAP-FILE pointer points to from memory.

Package

trivial-mmap.

Source

low-level-interface.lisp.

Function: copy-mmapped-file (instance)
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Function: make-mmapped-file (&key pointer size offset)
Package

trivial-mmap.

Source

trivial-mmap.lisp.


5.2.3 Structures

Structure: mmapped-file
Package

trivial-mmap.

Source

trivial-mmap.lisp.

Direct superclasses

structure-object.

Direct slots
Slot: pointer
Initform

(cffi-sys:null-pointer)

Readers

mmapped-file-pointer.

Writers

(setf mmapped-file-pointer).

Slot: size
Type

fixnum

Initform

0

Readers

mmapped-file-size.

Writers

(setf mmapped-file-size).

Slot: offset
Type

fixnum

Initform

0

Readers

mmapped-file-offset.

Writers

(setf mmapped-file-offset).


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   %   (  
C   F   M   W  
Index Entry  Section

%
%mmap-file: Private ordinary functions
%mmap-read-byte: Private ordinary functions
%mmap-read-char: Private ordinary functions
%munmap-file: Private ordinary functions
%with-mmap-file: Private macros

(
(setf mmapped-file-offset): Public ordinary functions
(setf mmapped-file-pointer): Public ordinary functions
(setf mmapped-file-size): Public ordinary functions

C
copy-mmapped-file: Private ordinary functions

F
Function, %mmap-file: Private ordinary functions
Function, %mmap-read-byte: Private ordinary functions
Function, %mmap-read-char: Private ordinary functions
Function, %munmap-file: Private ordinary functions
Function, (setf mmapped-file-offset): Public ordinary functions
Function, (setf mmapped-file-pointer): Public ordinary functions
Function, (setf mmapped-file-size): Public ordinary functions
Function, copy-mmapped-file: Private ordinary functions
Function, make-mmapped-file: Private ordinary functions
Function, mmap-file: Public ordinary functions
Function, mmap-read-byte: Public ordinary functions
Function, mmap-read-char: Public ordinary functions
Function, mmapped-file-offset: Public ordinary functions
Function, mmapped-file-p: Public ordinary functions
Function, mmapped-file-pointer: Public ordinary functions
Function, mmapped-file-size: Public ordinary functions
Function, munmap-file: Public ordinary functions

M
Macro, %with-mmap-file: Private macros
Macro, with-mmap-file: Public macros
make-mmapped-file: Private ordinary functions
mmap-file: Public ordinary functions
mmap-read-byte: Public ordinary functions
mmap-read-char: Public ordinary functions
mmapped-file-offset: Public ordinary functions
mmapped-file-p: Public ordinary functions
mmapped-file-pointer: Public ordinary functions
mmapped-file-size: Public ordinary functions
munmap-file: Public ordinary functions

W
with-mmap-file: Public macros


A.3 Variables