Reputation: 16029
This post is edited and the original post here is asking the implementation of _malloc_r which is not a good move to use.
My question now is there any other malloc implementation or alternative function for malloc and free functions?
Please advice.
Many thanks.
Upvotes: 0
Views: 1247
Reputation: 212979
There are a lot of alternate malloc implementations, usually intended for debugging or other special purposes. One that you might want to take a look at is Google's tcmalloc.
Upvotes: 2
Reputation: 215287
Give up on trying to have a reentrant malloc
. It's a bad idea. If you really need to allocate memory from signal handlers, use mmap
, but even that is a bad design.
Upvotes: 2