3 ms·
How do you redirect strdup() et al to your malloc? What's wrong with malloc hooks? http://www.gnu.org/software/libc/manual/html_node/Hooks-for-Malloc.html http
by zde 10y ago
How do you redirect strdup() et al to your malloc? What's wrong with malloc hooks?
http://www.gnu.org/software/libc/manual/html_node/Hooks-for-Malloc.html http://www.gnu.org/software/libc/manual/html_node/Hooks-for-...
- mulle_nat 10y agoWell for strdup, there is mulle_strdup. Who is Al ? :) There is nothing wrong with malloc hooks, but they are global and you can't isolate on a per data structure basis. Also when you malloc you know it's malloc, but calling mulle_allocator_malloc it could be something else (your own memory manager). That's the decoupling aspect.