Closed sylefeb closed 11 months ago
Err, no ... don't try to fit the header from fpga_req in there, it's an ugly mixing of abstraction layer for nothing .. the overhead of the malloc is negligible ...
Also this should be split in several commits.
re->data
, it won't be properly freed? My understanding is that it is always assumed that freeing the record also frees the memory pointed by re->data
? This seemed the simplest to avoid additional complications in the records (but this can be solved by adding a boolean tracking whether to free data
as well, and adding a call to free where needed?)Yeah, I would add a field saying if data needs freeing or not.
Noted, closing, will send new PR.
you know you can just force push to the same branch to update the existing PR :)
I did not :) I tried, option to reopen is grayed out though?
Yeah, that works when the PR is open, probably should have re-opened it before the force push, now it seems locked ... ah well, next time :sweat_smile:
Created a different one, good to know in any case!
This PR includes the following:
fpga_download
to exit in case of an error. The badge is then stuck on the last displayed error, preventing continuation after an error.fpga_req_add_file_data
with an option to capture the buffer given in parameter, as well as the caller so the buffer is padded with the header required for the list record. This avoid a double allocation of the data block.