Own malloc implementation
Hello,
I am using the gcc version 4.8.3 20140228 with Newlib. For some reasons I would like to ommit the Newlib's malloc implementation and use mine. Currently, it is not possible to redefine the malloc,
To solve it, I am using "scratch my left ear with right hand" solution by adding linker parameters
--wrap=_free_r
--wrap=_malloc_r
--wrap=_calloc_r
--wrap=_realloc_r
in my application
and syscall.c (in library) contains definition of __wrap_.... functions.
Is there any fancy solution to this? E.g. make _malloc_r weak, etc. The goal is to make it transparent to the application (no linker flags).
Thank You for any hints.
Martin
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Martin Velek for more information if necessary.