libsigrok/hardware/fx2lafw
Lars-Peter Clausen 17dff8a1e6 sr: fx2lafw: Avoid unnecessary alloc/free combo
In receive_transfer for each completed transfer a new buffer is allocated and
the old one is freed. We can avoid this by simply reusing the buffer for the
next transfer. This is possible if we only resubmit the transfer after all
processing on the data buffer has been done. A new buffer is only allocated if
the size of the old one is not 4096 bytes.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
2012-06-28 00:40:51 +02:00
..
Makefile.am fx2lafw: Implemented initial support for start capture 2012-03-07 07:52:05 +00:00
command.c sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning. 2012-05-31 22:48:40 +02:00
command.h sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning. 2012-05-31 22:48:40 +02:00
fx2lafw.c sr: fx2lafw: Avoid unnecessary alloc/free combo 2012-06-28 00:40:51 +02:00
fx2lafw.h sr: fx2lafw: Use gboolean, cosmetics, fix gcc warning. 2012-05-31 22:48:40 +02:00