Next: posix socket, Previous: posix fd, Up: posix [Index]
(vicare-scheme)Shared memory through mmap
for a
description of shared memory through mmap
.
Interface to the C function mmap()
, (libc)mmap. Create a new mapping and return a pointer object referencing the
region of memory.
address can be #f
or a pointer object; #f
is
interpreted as a NULL
pointer. length must be an exact
integer in the range of the C language type size_t
.
protect and flags must fixnums of flags. fd must be a
fixnum representing a file descriptor. offset must be an exact
integer in the range of the C language type off_t
.
NOTE On BSD and Darwin systems only
MAP_ANON
is defined,MAP_ANONYMOUS
is undefined.
Interface to the C function munmap()
, (libc)munmap. Remove memory mapping. Return unspecified values.
address is a pointer object referencing the mapping. length
must be an exact integer in the range of the C language type
size_t
.
Interface to the C function msync()
, (libc)msync. Synchronise the mapping with the underlying file. Return
unspecified values.
address is a pointer object referencing the mapping. length
must be an exact integer in the range of the C language type
size_t
. flags is a fixnum of flags.
Interface to the C function mremap()
, (libc)mremap. Change the size of an existing memory mapping; return a
pointer object referencing the new mapping.
address is a pointer object referencing the mapping. length
and new-length must be exact integers in the range of the C
language type size_t
. flags is a fixnum of flags.
Interface to the C function madvise()
, (libc)madvise. Synchronise the mapping with the underlying file.
Return unspecified values.
address is a pointer object referencing the mapping. length
must be an exact integer in the range of the C language type
size_t
. advice is a fixnum of flags.
Interface to the C functions mlock()
and munlock()
, see the
manual page mlock(2)
. Lock or unlock a segment of virtual
address space, preventing the memory from begin paged to the swap area.
If successful return unspecified values, else raise an exception.
Interface to the C functions mlockall()
and munlockall()
,
see the manual page mlock(2)
. Lock or unlock all pages. If
successful return unspecified values, else raise an exception.
flags must be a fixnum being an OR combination of the constants:
MCL_CURRENT
, MCL_FUTURE
.
Next: posix socket, Previous: posix fd, Up: posix [Index]