search for: writebufcnt

Displaying 2 results from an estimated 2 matches for "writebufcnt".

2003 Jan 03
0
[Fwd: Re: rsync windows -> unix still hanging :(]
...=============================================================== RCS file: /cvsroot/rsync/fileio.c,v retrieving revision 1.5 diff -r1.5 fileio.c 79c79,107 < return write(f,buf,len); --- > static char *writeBuf; > static size_t writeBufSize; > static size_t writeBufCnt; > > if ( !writeBuf ) { > writeBufSize = MAX_MAP_SIZE; > writeBufCnt = 0; > writeBuf = (char*)malloc(MAX_MAP_SIZE); > if (!writeBuf) out_of_memory("write_file"); > } > ret = len; >...
2002 Dec 09
2
Rsync performance increase through buffering
...iff -bur rsync/fileio.c rsync-craig/fileio.c --- rsync/fileio.c Fri Jan 25 15:07:34 2002 +++ rsync-craig/fileio.c Sat Dec 7 22:21:10 2002 @@ -76,7 +76,35 @@ int ret = 0; if (!sparse_files) { - return write(f,buf,len); + static char *writeBuf; + static size_t writeBufSize; + static size_t writeBufCnt; + + if ( !writeBuf ) { + writeBufSize = MAX_MAP_SIZE; + writeBufCnt = 0; + writeBuf = (char*)malloc(MAX_MAP_SIZE); + if (!writeBuf) out_of_memory("write_file"); + } + ret = len; + do { + if ( buf && writeBufCnt < writeBufSize ) { + size_t copyLe...