PyDocs

Networking and Interprocess Communication

Networking and Interprocess Communication

mmap

not WASI

Memory-mapped file objects behave like both bytearray and like file objects. You can use mmap objects in most places where bytearray are expected; for example, you can use the re module to search through a memory-mapped file. You can also change a single byte by doing obj[index] = 97, or change a subsequence by assigning to a slice: obj[i1:i2] = b'...'. You can also read and write data starting at the current file position, and seek() through the file to different positions.
Symbols in mmap

a

ACCESS_COPY
These constants specify the access mode for a memory mapping.
ACCESS_DEFAULT
These constants specify the access mode for a memory mapping.
ACCESS_READ
These constants specify the access mode for a memory mapping.
ACCESS_WRITE
These constants specify the access mode for a memory mapping.
ALLOCATIONGRANULARITY
PAGESIZE is the system memory page size in bytes.

m

MADV_AUTOSYNC
These options can be passed to mmap.madvise().
MADV_CORE
These options can be passed to mmap.madvise().
MADV_DODUMP
These options can be passed to mmap.madvise().
MADV_DOFORK
These options can be passed to mmap.madvise().
MADV_DONTDUMP
These options can be passed to mmap.madvise().
MADV_DONTFORK
These options can be passed to mmap.madvise().
MADV_DONTNEED
These options can be passed to mmap.madvise().
MADV_FREE
These options can be passed to mmap.madvise().
MADV_FREE_REUSABLE
These options can be passed to mmap.madvise().
MADV_FREE_REUSE
These options can be passed to mmap.madvise().
MADV_HUGEPAGE
These options can be passed to mmap.madvise().
MADV_HWPOISON
These options can be passed to mmap.madvise().
MADV_MERGEABLE
These options can be passed to mmap.madvise().
MADV_NOCORE
These options can be passed to mmap.madvise().
MADV_NOHUGEPAGE
These options can be passed to mmap.madvise().
MADV_NORMAL
These options can be passed to mmap.madvise().
MADV_NOSYNC
These options can be passed to mmap.madvise().
MADV_PROTECT
These options can be passed to mmap.madvise().
MADV_RANDOM
These options can be passed to mmap.madvise().
MADV_REMOVE
These options can be passed to mmap.madvise().
MADV_SEQUENTIAL
These options can be passed to mmap.madvise().
MADV_SOFT_OFFLINE
These options can be passed to mmap.madvise().
MADV_UNMERGEABLE
These options can be passed to mmap.madvise().
MADV_WILLNEED
These options can be passed to mmap.madvise().
MAP_32BIT
These are the various flags that can be passed to mmap.mmap().
MAP_ALIGNED_SUPER
These are the various flags that can be passed to mmap.mmap().
MAP_ANON
These are the various flags that can be passed to mmap.mmap().
MAP_ANONYMOUS
These are the various flags that can be passed to mmap.mmap().
MAP_CONCEAL
These are the various flags that can be passed to mmap.mmap().
MAP_DENYWRITE
These are the various flags that can be passed to mmap.mmap().
MAP_EXECUTABLE
These are the various flags that can be passed to mmap.mmap().
MAP_HASSEMAPHORE
These are the various flags that can be passed to mmap.mmap().
MAP_JIT
These are the various flags that can be passed to mmap.mmap().
MAP_NOCACHE
These are the various flags that can be passed to mmap.mmap().
MAP_NOEXTEND
These are the various flags that can be passed to mmap.mmap().
MAP_NORESERVE
These are the various flags that can be passed to mmap.mmap().
MAP_POPULATE
These are the various flags that can be passed to mmap.mmap().
MAP_PRIVATE
These are the various flags that can be passed to mmap.mmap().
MAP_RESILIENT_CODESIGN
These are the various flags that can be passed to mmap.mmap().
MAP_RESILIENT_MEDIA
These are the various flags that can be passed to mmap.mmap().
MAP_SHARED
These are the various flags that can be passed to mmap.mmap().
MAP_STACK
These are the various flags that can be passed to mmap.mmap().
MAP_TPRO
These are the various flags that can be passed to mmap.mmap().
MAP_TRANSLATED_ALLOW_EXECUTE
These are the various flags that can be passed to mmap.mmap().
MAP_UNIX03
These are the various flags that can be passed to mmap.mmap().
mmap
Windows: mmap(fileno, length[, tagname[, access[, offset[, trackfd]]]])
MS_ASYNC
These flags control the synchronization behavior for mmap.flush():
MS_INVALIDATE
These flags control the synchronization behavior for mmap.flush():
MS_SYNC
These flags control the synchronization behavior for mmap.flush():

p

PAGESIZE
PAGESIZE is the system memory page size in bytes.
PROT_EXEC
Memory protection flags accepted by the prot argument of mmap.
PROT_READ
Memory protection flags accepted by the prot argument of mmap.
PROT_WRITE
Memory protection flags accepted by the prot argument of mmap.