Attention is currently required from: Nico Huber, Edward O'Callaghan, Angel Pons.
1 comment:
File buspirate_spi.c:
Patch Set #2, Line 167: struct buspirate_spi_data *buspirate_data = data;
> I can probably create bp_commbuf as a local variable, alloc at the beginning and free at the end. […]
Thank you so much for detailed explanation, and I am really sorry for delay from my side! During last week, I was opening this every day, re-reading, and trying to understand what to do. I think I need to ask another question or two to fully understand.
So if I take the approach of allocating maximum all the time, that would mean commbuf_grow is never needed, but that would use a lot more memory? Especially if "create bp_commbuf as a local variable, alloc at the beginning and free at the end."
If malloc() and free() are not expensive, only realloc() is then maybe I can leave size as is, just use local variable everywhere - because the number of reallocs won't change anyway?
To view, visit change 52958. To unsubscribe, or for help writing mail filters, visit settings.