◐ Shell
clean mode source ↗

gh-87595: mmap.size() now returns the size on Unix for anonymous memory by ZackerySpytz · Pull Request #24781 · python/cpython

Previously, the size would be returned on Windows and an OSError would
be raised on Unix.

furkanonder

@arhadthedev arhadthedev changed the title bpo-43429: mmap.size() now returns the size on Unix for anonymous memory gh-87595: mmap.size() now returns the size on Unix for anonymous memory

May 12, 2023

furkanonder

iritkatriel

@arhadthedev

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Sep 2, 2025
…thonGH-24781)

Previously, the size would be returned on Windows and an OSError would
be raised on Unix.

Also, raise ValueError instead of OSError for trackfd=False.
(cherry picked from commit 32032ee)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Sep 2, 2025
…thonGH-24781)

Previously, the size would be returned on Windows and an OSError would
be raised on Unix.

Also, raise ValueError instead of OSError for trackfd=False.
(cherry picked from commit 32032ee)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>

ZackerySpytz

lkollar pushed a commit to lkollar/cpython that referenced this pull request

Sep 9, 2025
…thonGH-24781)

Previously, the size would be returned on Windows and an OSError would
be raised on Unix.

Also, raise ValueError instead of OSError for trackfd=False.

Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>