Several plugins use malloc / free in the plugin itself (e.g., for creating a SquashStream). These should be converted to use squash_malloc / squash_free.
Additionally, several plugins use libraries which support custom callbacks for memory allocation / deallocation, we should use that functionality.
[x] brieflz — caller provides buffer
[x] bzip2 — custom malloc/free funcs
[x] copy — N/A
[x] crush — custom malloc/free funcs
[x] density — custom malloc/free funcs
[x] fastlz — stack based
[x] heatshrink — N/A
[ ] lz4 — ???
[x] lzf — stack based, but it might be wise to use LZF_STATE_ARG since LZF_STATE is rather large…
Several plugins use
malloc
/free
in the plugin itself (e.g., for creating a SquashStream). These should be converted to usesquash_malloc
/squash_free
.Additionally, several plugins use libraries which support custom callbacks for memory allocation / deallocation, we should use that functionality.