[COMMIT] Correct ChangeLog, use explicit hex constant for READ_BUF_SIZE

Aidan Kehoe <[email protected]>
Newsgroups gmane.emacs.xemacs.patches
Message-ID <[email protected]>
Again, thank you Jerry!

APPROVE COMMIT

NOTE: This patch has been committed.

# HG changeset patch
# User Aidan Kehoe <[email protected]>
# Date 1390241595 0
# Node ID 7277cf461612be80403c68d3368a5b3329210e3d
# Parent  0853e1ec8529b0b7d50abe5ffdadaaee54c3d9b4
Use an explicit hexadecimal constant for READ_BUF_SIZE, correct ChangeLog.

src/ChangeLog addition:

2014-01-20  Aidan Kehoe  <[email protected]>

	* fileio.c
	[...]
	(READ_BUF_SIZE): Use an explicit hexadecimal constant for the
	0x20000 value for this, don't left-shift 2 16 times. Correct the
	last ChangeLog entry after Jerry James pointed out a mistake on my
	part. Thank you for review and discussion, Jerry and Stephen
	Turnbull.

diff -r 0853e1ec8529 -r 7277cf461612 src/ChangeLog
--- a/src/ChangeLog	Mon Jan 20 17:53:07 2014 +0000
+++ b/src/ChangeLog	Mon Jan 20 18:13:15 2014 +0000
@@ -6,14 +6,19 @@
 	these two functions, but does mean that decisions about alloca
 	vs. malloc based on buffer size are made in the same place
 	(ultimately, the ALLOCA() macro).
+	(READ_BUF_SIZE): Use an explicit hexadecimal constant for the
+	0x20000 value for this, don't left-shift 2 16 times. Correct the
+	last ChangeLog entry after Jerry James pointed out a mistake on my
+	part. Thank you for review and discussion, Jerry and Stephen
+	Turnbull.
 
 2014-01-16  Aidan Kehoe  <[email protected]>
 
 	* fileio.c (READ_BUF_SIZE):
 	Stack sizes > 2**16 elicited bugs back in August 1996, but there's
 	nothing to indicate this is still the case. GNU uses a block size
-	of #x10000, and that size works better with the coding system
-	buffering, improving performance there; move to this value.
+	of #x10000 without problems, we can afford to be a bit more
+	adventurous with a value of #x20000.
 
 	Use it in #'copy-file too, move its #define earlier to make that
 	possible. Not relevant to the coding system buffering, but still
diff -r 0853e1ec8529 -r 7277cf461612 src/fileio.c
--- a/src/fileio.c	Mon Jan 20 17:53:07 2014 +0000
+++ b/src/fileio.c	Mon Jan 20 18:13:15 2014 +0000
@@ -1786,7 +1786,7 @@
   return;
 }
 
-#define READ_BUF_SIZE (2 << 16)
+#define READ_BUF_SIZE 0x20000
 
 DEFUN ("copy-file", Fcopy_file, 2, 4,
        "fCopy file: \nFCopy %s to file: \np\nP", /*


-- 
‘Liston operated so fast that he once accidentally amputated an assistant’s
fingers along with a patient’s leg, […] The patient and the assistant both
died of sepsis, and a spectator reportedly died of shock, resulting in the
only known procedure with a 300% mortality.’ (Atul Gawande, NEJM, 2012)

_______________________________________________
XEmacs-Patches mailing list
[email protected]
http://lists.xemacs.org/mailman/listinfo/xemacs-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.