Skip to content

Commit b35d308

Browse files
authored
set MAX_OS_WRITE on unix (#54233)
Fixes #54225
1 parent 37f848c commit b35d308

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

base/stream.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const DEFAULT_READ_BUFFER_SZ = 10485760 # 10 MB
122122
if Sys.iswindows()
123123
const MAX_OS_WRITE = UInt(0x1FF0_0000) # 511 MB (determined semi-empirically, limited to 31 MB on XP)
124124
else
125-
const MAX_OS_WRITE = UInt(typemax(Csize_t))
125+
const MAX_OS_WRITE = UInt(0x7FFF_0000) # almost 2 GB (both macOS and linux have this kernel restriction, although only macOS documents it)
126126
end
127127

128128

0 commit comments

Comments
 (0)