diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2016-09-21 15:56:19 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2016-09-21 15:56:19 -0700 |
commit | 04445364fc9123ad40bf5581ffa4c5afac4c57dc (patch) | |
tree | 127577894550f7f99518de1e030cbefe4f8fa08b /include | |
parent | d81a235f33e78ef6b942788b42db073ed51fa801 (diff) | |
download | nasm-04445364fc9123ad40bf5581ffa4c5afac4c57dc.tar.gz |
incbin: if we have to fread(), try to do it only once...
If we can't mmap a file and instead have to fread(), if the data is
small enough that we can reasonably accomodate it in a memory buffer,
then just read it once.
It seems rather unlikely that very large files would be used with
TIMES anyway.
Also note: the previous comment about nasm_file_size[_by_path]() being
invoked twice was spurious; it does not actually happen.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/nasmlib.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/nasmlib.h b/include/nasmlib.h index e24ac1d5..b1c490ca 100644 --- a/include/nasmlib.h +++ b/include/nasmlib.h @@ -455,7 +455,7 @@ FILE *nasm_open_write(const char *filename, enum file_flags flags); /* Probe for existence of a file */ bool nasm_file_exists(const char *filename); -#define ZERO_BUF_SIZE 4096 /* Default value */ +#define ZERO_BUF_SIZE 65536 /* Default value */ #if defined(BUFSIZ) && (BUFSIZ > ZERO_BUF_SIZE) # undef ZERO_BUF_SIZE # define ZERO_BUF_SIZE BUFSIZ |