-
-
Notifications
You must be signed in to change notification settings - Fork 89
Get rid of hard-coded/static transfer buffer size #669
Description
abstract_controller.h declares static transfer buffers with static sizes. The default buffer size is 4096 bytes, which accomodates for the maximum supported sector size, but only works for disk-like devices. Because this size is not sufficient for the Daynaport there is already a bigger buffer DAYNAPORT_BUFFER_SIZE, also with a hard-coded size. The fact that a second buffer is required already shows that there is an issue with hard-coded buffer sizes.
The situation gets worse with SCSI commands like WRITE/READ LONG or PRINT, which just like the Daynaport, require support for memory chunks that are not multiples of the sector size.
A std::vector shall be used and resized where required.
#335 is related, because both transfer buffers and the cache suffer from the fixed size restriction.