Skip to content
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

[UTSTRING] Change the standard malloc()/free() #173

Open
silvioprog opened this issue Apr 21, 2019 · 2 comments
Open

[UTSTRING] Change the standard malloc()/free() #173

silvioprog opened this issue Apr 21, 2019 · 2 comments

Comments

@silvioprog
Copy link

Hello.

The uthash feature allows to change the standard functions malloc(), free() etc. by replacing the macros uthash_malloc, uthash_free and so on. What do you thing about to adopt the same idea in other features like utstring? If you are OK, I could send a patch to implement it on utstring and utlist.

cheers

@Quuxplusone
Copy link
Collaborator

I'd be amenable to the idea. I don't personally use utstring or utlist, and my impression is that they don't have as many users as uthash, which I guess means that the voices of actual users should carry a lot of weight.

Do you use utstring and utlist, and suffer from the absence of this feature? Have you implemented it in a branch and proven to your satisfaction that it solves a problem you're having?

@silvioprog
Copy link
Author

I'd be amenable to the idea.

😃

... I don't personally use utstring or utlist, and my impression is that they don't have as many users as uthash, which I guess means that the voices of actual users should carry a lot of weight.

Maybe some users don't say they use them, but the utstring/utlist are awesome features. I've used them in a library I'm maintaining and using in production around two years, and my conclusion is you did an incredible job in these headers. (thank you very much!)

Do you use utstring and utlist, and suffer from the absence of this feature? Have you implemented it in a branch and proven to your satisfaction that it solves a problem you're having?

Yes. The reason about suggesting the feature is to make utstring/utlist so customizable as uthash and the most important thing: portability.

Recently I added a tiny "memory manager" (allocator) to the library and mapped the macros uthash_malloc()/uthash_free(), I'm going to map the allocator of other libraries I'm using (zlib, pcre2, mhd, utstring/utlist etc.), so I would be glad to contribute by helping to implement this feature in utstring/utlist. I'm ready to make a fork and send it as PR. 😅

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

No branches or pull requests

2 participants