Skip to content

Support for custom malloc and free functions (RTOS support) #12

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Zbysekz
Copy link

@Zbysekz Zbysekz commented Jun 24, 2025

I have added support for customizing methods for "malloc" and "free".

This is required if we run on FREERTOS embedded system. (For your info on cubesat - small satellite)

Thanks for this project anyway.

@avaneev
Copy link
Owner

avaneev commented Jun 24, 2025

Thanks for the commit, seems reasonable, but let me implement it my way - I'll update lzav soon. Another reason is that I really want to keep this project "solo" due to some reasons (I'm in Russia) - I do not want to put anyone at some legal risk.

@Zbysekz
Copy link
Author

Zbysekz commented Jun 24, 2025

ok yes i undrestand. Well i just figured out, that the RAM memory usage is very demanding, for 8kB file it is 32KB which is too much for us. So you can close it or proceed as you wish, but i will try to use the LZ4 library.

@avaneev
Copy link
Owner

avaneev commented Jun 24, 2025

You actually have an option to use the lzav_compress() function directly with its ext_buf params and externally-allocated buffer - may be you can still get a reasonable compression at e.g. 16KB hash table size. But LZ4 may anyway be more efficient than the current LZAV version for such small inputs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants