This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: x*alloc optimizations
- To: Michael Meissner <meissner at cygnus dot com>
- Subject: Re: x*alloc optimizations
- From: Jim Meyering <meyering at ascend dot com>
- Date: 20 May 1998 09:09:01 -0500
- Cc: drepper at cygnus dot com, egcs at cygnus dot com
- References: <199805182309.TAA00943@tiktok.cygnus.com>
Michael Meissner <meissner@cygnus.com> writes:
| This is an unneeded micro-optimization. I would rather burn the 2-3
| instructions for every xmalloc call than add a bunch of configure support and
| ifdefs to complicate the code. Especially for Canadian crosses where you can't
| test the behavior of the runtime system. Another problem is that when GCC
| configured it, malloc/calloc/realloc behaved in one fashion, but when the user
| put the binary compiler on his/her system, the system malloc in the shared
| library now behaves differently.
I admit it may not be worth it, but it can be done without
complicating the code. Uses of *alloc functions don't change
at all, and the only ifdefs I added (when I did this for fileutils)
were in the replacement lib/*alloc.c functions. The m4 tests assume
*alloc are broken when cross compiling.