0d6b8f65a9
In some complex scenarios (free() without finishing compression), it is possible that some resources are still into jobs and not collected back into pools. In which case, previous version of free() would miss them. This would be equivalent to a leak. New version ensures that it even foes after such resource. It requires job consumers to properly mark resources as released, by replacing entries by NULL after releasing back to the pool. Obviously, it's not recommended to free() zstdmt context mid-term, still that's now a supported scenario. The same methodology is also used to ensure proper resource collection after an error is detected. Still to do : - detect compression errors (not just allocation ones) - properly manage resource when init() is called without finishing previous compression. |
||
---|---|---|
.. | ||
fse_compress.c | ||
huf_compress.c | ||
zstd_compress.c | ||
zstd_opt.h | ||
zstdmt_compress.c | ||
zstdmt_compress.h |