Thread (16 messages) flat view 16 messages, 5 authors, 2016-06-15

Re: read() MAX_IO_SIZE bytes, more than SSIZE_MAX?

From: Joachim Schmitz <hidden>
Date: 2016-06-15 23:03:45

Torsten Bögershausen <tboegi <at> web.de> writes:
On 2015-02-07 17.45, Joachim Schmitz wrote:
<snip>
How about changing wrapper.c like this:

#ifndef MAX_IO_SIZE
 #define MAX_IO_SIZE (8*1024*1024)
#endif
---------------------
and to change config.mak.uname like this:

ifeq ($(uname_S),NONSTOP_KERNEL)

	BASIC_CFLAGS += -DMAX_IO_SIZE=(32*1024)
Does this work for you ?
Of course it would, but, 
a) 32k is smaller than we can go (and yes, we could make it 52k)
b) never ever should read() be asked to read more than SSIZE_MAX, this  
should be true for every platform on the planet? You may want to have is 
smaller than SSIZE_MAX (like the current 8MB vs. the possible 2TB on 
Linux), but surely never larger?

Bye, Jojo
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help