Custom memory management functions for malloc and free

瀏覽次數:38 次
跳到第一則未讀訊息

Jeevan Ladhe

未讀,
2021年10月18日 上午9:03:452021/10/18
收件者: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
回覆所有人
回覆作者
轉寄
0 則新訊息