[Pkg-gnupg-commit] [gnupg2] 66/205: common: Reduce buffer size.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed May 11 08:38:17 UTC 2016


This is an automated email from the git hooks/post-receive script.

dkg pushed a commit to branch experimental
in repository gnupg2.

commit 75861b663bbb37214143c2ff7b1b4d1d10ba2657
Author: Neal H. Walfield <neal at g10code.com>
Date:   Tue Feb 23 22:39:58 2016 +0100

    common: Reduce buffer size.
    
    * common/iobuf.c (iobuf_copy): Change buffer size from 1 MB to 32 KB.
    
    --
    Change suggested by Werner based on the observation that other buffers
    are of a similar size.
    
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
---
 common/iobuf.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/common/iobuf.c b/common/iobuf.c
index 9816d55..bd1c30f 100644
--- a/common/iobuf.c
+++ b/common/iobuf.c
@@ -2227,8 +2227,8 @@ size_t
 iobuf_copy (iobuf_t dest, iobuf_t source)
 {
   char *temp;
-  /* Use a 1 MB buffer.  */
-  const size_t temp_size = 1024 * 1024;
+  /* Use a 32 KB buffer.  */
+  const size_t temp_size = 32 * 1024;
 
   size_t nread;
   size_t nwrote = 0;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list