This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] New fixes for hot/cold partitioning



On Monday, April 4, 2005, at 10:35 AM, Zack Weinberg wrote:


Caroline M Tice <ctice@apple.com> writes:

On Monday, April 4, 2005, at 09:59 AM, Ian Lance Taylor wrote:

Caroline M Tice <ctice@apple.com> writes:

- It changes unlikely_text_section_name from a char* to an array;
initializes it appropriately, changes all uses of it to reflect the
new format; and removes the call to free it.

I missed the reasons for making this change, but it looks questionable
to me. It's not hard to construct C++ templates in which section
names are identical in the first 256 characters.

What would be a reasonable size limit to use then?

I don't think you can impose a limit. (Nor is it clear to me why you made this change in the first place.)

zw


I made the change because I discovered I could not free it until after dwarf2out_finish was called, after compiling ALL the functions in the compilation unit. Since I couldn't free it, it seemed best not to malloc it (especially malloc'ing multiple times and having a memory leak).

I didn't particularly like making it a fixed size and am open to other
suggestions.

-- Caroline
ctice@apple.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]