Josh Rosenberg <shadowranger+pyt...@gmail.com> added the comment:

It might be nice to expose a more limited API to prefetch memory in bulk while 
we're at it. Windows 8 and higher offers PrefetchVirtualMemory ( 
https://docs.microsoft.com/en-us/windows/desktop/api/memoryapi/nf-memoryapi-prefetchvirtualmemory
 ) which fills roughly the same niche as madvise/posix_madvise with the 
WILLNEED hint.

I kept meaning to file an issue to suggest this, but kept getting hung up on 
how to make it as portable as possible and as powerful as possible, and where 
to implement it.

It could go on mmap, but it's also useful for just about any contiguous 
buffer-supporting object, so it almost seems like adding an os.madvise (and/or 
os.prefetch) would make more sense than specifically tying it to the mmap 
module.

----------
nosy: +josh.r

_______________________________________
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