• Home
  • Raw
  • Download

Lines Matching +full:unix +full:- +full:like

1 :mod:`mmap` --- Memory-mapped file support
5 :synopsis: Interface to memory-mapped files for Unix and Windows.
7 --------------
9 .. include:: ../includes/wasm-notavail.rst
11 Memory-mapped file objects behave like both :class:`bytearray` and like
14 module to search through a memory-mapped file. You can also change a single
19 A memory-mapped file is created by the :class:`~mmap.mmap` constructor, which is
20 different on Unix and on Windows. In either case you must provide a file
28 If you want to create a memory-mapping for a writable, buffered file, you
33 For both the Unix and Windows versions of the constructor, *access* may be
36 specify read-only, write-through or copy-on-write memory respectively, or
37 :const:`ACCESS_DEFAULT` to defer to *prot*. *access* can be used on both Unix
39 write-through mapping. The initial memory values for all three access types
49 To map anonymous memory, -1 should be passed as the fileno along with the length.
66 Unix and Windows.
68 *offset* may be specified as a non-negative integer offset. mmap references
72 .. audit-event:: mmap.__new__ fileno,length,access,offset mmap.mmap
77 **(Unix version)** Maps *length* bytes from the file specified by the file
83 private copy-on-write mapping, so changes to the contents of the mmap
88 :ref:`MAP_* constants <map-constants>`.
100 *offset* may be specified as a non-negative integer offset. mmap references
103 which is equal to :const:`PAGESIZE` on Unix systems.
118 # memory-map the file, size 0 means whole file
139 with mmap.mmap(-1, 13) as mm:
152 mm = mmap.mmap(-1, 13)
163 .. audit-event:: mmap.__new__ fileno,length,access,offset mmap.mmap
165 Memory-mapped file objects support the following methods:
186 Returns ``-1`` on failure.
189 Writable :term:`bytes-like object` is now accepted.
194 Flushes changes made to the in-memory copy of a file back to disk. Without
207 exception was raised on error under Unix.
214 :ref:`MADV_* constants <madvise-constants>` available on the system. If
275 Returns ``-1`` on failure.
278 Writable :term:`bytes-like object` is now accepted.
292 memory-mapped area.
310 Writable :term:`bytes-like object` is now accepted.
323 .. _madvise-constants:
360 .. _map-constants: