Fixed problem with lookaheads larger than block device

Simply limiting the lookahead region to the size of
the block device fixes the problem.

Also added logic to limit the allocated region and
floor to nearest word, since the additional memory
couldn't really be used effectively.
This commit is contained in:
Christopher Haster
2017-09-18 21:20:33 -05:00
parent d9367e05ce
commit 273cb7c9c8
3 changed files with 29 additions and 24 deletions

View File

@@ -15,3 +15,4 @@ script:
- CFLAGS="-DLFS_READ_SIZE=1 -DLFS_PROG_SIZE=1" make test
- CFLAGS="-DLFS_READ_SIZE=512 -DLFS_PROG_SIZE=512" make test
- CFLAGS="-DLFS_BLOCK_COUNT=1023" make test
- CFLAGS="-DLFS_LOOKAHEAD=2047" make test