Paul <paul.carli...@gmail.com> added the comment:
Michael, I ran into the same issue as you. I got it to work by changing the mmap size to 8K. d = os.open(disk_file_path, os.O_RDWR | os.O_DIRECT | os.O_SYNC | os.O_DSYNC) readbuf = mmap.mmap(-1, 8192) os.lseek(d, 0, os.SEEK_SET) fo = os.fdopen(d, 'rb') fo.readinto(readbuf) Should work. What's strange is that further multiples of 4K seem to work OK. readbuf = mmap.mmap(-1, 4096 * 3) Also works... So what's going on with 4K? ---------- nosy: +yoyoyopcp _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue5396> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com