Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
only limit blocksize to 1GiB for 32 archs
  • Loading branch information
giampaolo committed Sep 30, 2019
commit 222a267e5aa4f72f36be1b188f207e7f0803ee5d
3 changes: 2 additions & 1 deletion Lib/shutil.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ def _fastcopy_sendfile(fsrc, fdst):
# changes while being copied.
try:
blocksize = max(os.fstat(infd).st_size, 2 ** 23) # min 8MiB
blocksize = min(blocksize, 2 ** 30) # max 1GiB
if sys.maxsize < 2 ** 32: # 32-bit architecture
blocksize = min(blocksize, 2 ** 30) # max 1GiB

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you please add a comment explaining this 1 GiB limit?

except OSError:
blocksize = 2 ** 27 # 128MB

Expand Down