PyDocs

Nav

Networking and Interprocess Communication

mmap.flush

mmap

method of mmapnot WASI
  • mmap.flush([offset, [size, ]]*, flags=MS_SYNC)
Flushes changes made to the in-memory copy of a file back to disk. Without use of this call there is no guarantee that changes are written back before the object is destroyed. If offset and size are specified, only changes to the given range of bytes will be flushed to disk; otherwise, the whole extent of the mapping is flushed. offset must be a multiple of the PAGESIZE or ALLOCATIONGRANULARITY.
Changed in 3.8, 3.15
  • 3.8: Previously, a nonzero value was returned on success; zero was returned on error under Windows. A zero value was returned on success; an exception was raised on error under Unix.
  • 3.15: Allow specifying offset without size. Previously, both offset and size parameters were required together. Now offset can be specified alone, and the flush operation will extend from offset to the end of the mmap.
  • 3.15: Added flags parameter to control synchronization behavior.
0 Examples
No examples for mmap/mmap.flush.
See Also
No see-alsos for mmap/mmap.flush
0 Notes
No notes for mmap.flush