Mail Archives: djgpp-workers/2003/03/18/11:06:37
> > I'm not sure renaming standard functions is a good idea. There are
> > development tools out there (e.g., GDB) that _depend_ on their
> > knowledge of some of these fucntions. If we have __malloc instead of
> > _malloc in our symbol table, these tools might become confused.
I would say even more strongly it's a bad idea, since we need to work
with libraries which source may not be readily available, but you
need to know if their use of malloc() is causing problems.
> > Isn't there some other way of providing hooks?
>
> I would be glad to try something else, if anyone can propose it.
> Meanwhile note that the _malloc name etc are limited to the files
> hookmem.h, malldbg.c, and (only when HOOKABLE is defined)
> nmalloc.c. The three names are easily changed to something else
> if conflicts arise. They do not propagate onward, except as the
> linker handles them. Eventually the two .c files can be combined,
> with the malldbg portion enabled only by HOOKABLE, and the name
> pollution can disappear.
This must be a run time option, not a compile time option. What's
the problem with the hooks the library currently uses (adding them
to the nmalloc code?)
- Raw text -