New submission from Antoine Pitrou <pit...@free.fr>:

On POSIX, mmap objects could expose a method wrapping the madvise() library 
call.  I suggest the following API

  mmap_object.madvise(option[, start[, length]])

If omitted, *start* and *length* would span the whole memory area described by 
the mmap object.  *option* must be a recognized OS option for the madvise() 
library call.

The mmap module would expose the various MADV_* options available on the 
current platform.

Open question: should we expose madvise() or posix_madvise()? (these are two 
different calls, at least on Linux)  posix_madvise() is arguably more portable, 
but madvise() is much more powerful, so I'd lean towards madvise().

----------
components: Library (Lib)
messages: 312758
nosy: larry, ned.deily, neologix, pitrou, ronaldoussoren
priority: normal
severity: normal
status: open
title: mmap should expose madvise()
type: enhancement
versions: Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32941>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to