Closed GoogleCodeExporter closed 9 years ago
I believe you can get away without any code modification at all. Compile
mongoose.c with -Dmalloc=my_alloc , and link against your file where you have
those implemented.
Original comment by valenok
on 21 Jun 2011 at 11:31
So instead of supporting it nicely in the code, you would want me to use 4
overrides from the command line? I guess I'll be maintaining a fork for a
while then.
This change isn't just for overriding malloc. It overrides malloc, calloc,
realloc and free, all of which are used in mongoose. Additionally, doing it
the way you have indicated may not work correctly with valgrind or other
redirectors that are used to check memory use.
In short: adding -Dmalloc=my_alloc -Dcalloc=my_calloc -Drealloc=my_realloc
-Dfree=my_free is not palatable. Thanks anyways.
Original comment by gjhur...@gmail.com
on 21 Jun 2011 at 11:42
Original issue reported on code.google.com by
gjhur...@gmail.com
on 27 Dec 2010 at 7:31