forked from lix-project/lix
don't malloc/memset posix accessor buffer
it's relatively small and fits on the stack nicely, and we don't need it initialized either.
This commit is contained in:
parent
b78e77b34c
commit
f9aee2f2c4
|
@ -25,7 +25,7 @@ void PosixSourceAccessor::readFile(
|
|||
|
||||
off_t left = st.st_size;
|
||||
|
||||
std::vector<unsigned char> buf(64 * 1024);
|
||||
std::array<unsigned char, 64 * 1024> buf;
|
||||
while (left) {
|
||||
checkInterrupt();
|
||||
ssize_t rd = read(fd.get(), buf.data(), (size_t) std::min(left, (off_t) buf.size()));
|
||||
|
|
Loading…
Reference in a new issue