Custom memory management functions for malloc and free

43 views
Skip to first unread message

Jeevan Ladhe

unread,
Oct 18, 2021, 9:03:45 AM10/18/21
to LZ4c
Hi experts,

I am working on a project where I am trying to use LZ4 frame compression for backup. I would like to use custom malloc/free functions just like how gzip and ZSTD allows to use us.

Will it be possible for LZ4 to support this kind of custom alloc/free functions?
This is needed because the code where we are freeing the compression context might not be reachable by application if it error's out half-way. The custom functions would allocate the memory in certain contexts and that way it will be cleared once the context is released. This way we can avoid the memory leak.

Kindly note that I am willing to contribute the patch if we are open for this proposal and I am allowed to do so.

Appreciate your help.

Regards,
Jeevan Ladhe
Reply all
Reply to author
Forward
0 new messages