aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Larsson <[email protected]>2016-03-18 16:43:52 +0100
committerLukas Larsson <[email protected]>2016-03-18 16:43:52 +0100
commitc93cfa534aea23aaae148dfe414fd82d8f6afda0 (patch)
treebd3bb28e98d2bf85975fc67e88524bb2ebc2db9f /lib
parent6a0e1c5664f9d94d2c361a0023e7d25001aaa2e7 (diff)
downloadotp-c93cfa534aea23aaae148dfe414fd82d8f6afda0.tar.gz
otp-c93cfa534aea23aaae148dfe414fd82d8f6afda0.tar.bz2
otp-c93cfa534aea23aaae148dfe414fd82d8f6afda0.zip
kernel: Reduce sendfile fallback chunk size
This is necessary for windows to perform correctly when writing large files.
Diffstat (limited to 'lib')
-rw-r--r--lib/kernel/src/file.erl3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/kernel/src/file.erl b/lib/kernel/src/file.erl
index 1007f04413..1076e02422 100644
--- a/lib/kernel/src/file.erl
+++ b/lib/kernel/src/file.erl
@@ -1227,7 +1227,8 @@ change_time(Name, {{AY, AM, AD}, {AH, AMin, ASec}}=Atime,
%% Send data using sendfile
%%
--define(MAX_CHUNK_SIZE, (1 bsl 20)*20). %% 20 MB, has to fit in primary memory
+%% 1 MB, Windows seems to behave badly if it is much larger then this
+-define(MAX_CHUNK_SIZE, (1 bsl 20)).
-spec sendfile(RawFile, Socket, Offset, Bytes, Opts) ->
{'ok', non_neg_integer()} | {'error', inet:posix() |