[Ffmpeg-devel] [PATCH] rtp.h warning
Thu Mar 22 22:22:02 CET 2007
Rich Felker <dalias at aerifal.cx> writes:
> On Thu, Mar 22, 2007 at 09:07:40PM +0000, M?ns Rullg?rd wrote:
>> Rich Felker <dalias at aerifal.cx> writes:
>> > On Thu, Mar 22, 2007 at 02:12:05PM -0400, Glenn Maynard wrote:
>> >> Regarding XXX: is there a reason this isn't simply "const char
>> >> *enc_name"? It'd save a few K on that table.
>> > Dunno the specifics here, but using const char * instead of const
>> > char in tables is very bad with shared libaries. It greatly
>> > increases the startup time (relocations) and prevents the tables from
>> > being in shared memory.
>> Why is that so?
> Because the pointer is not a linktime constant. It depends on the
> address at which the library is loaded, which in turn depends on which
> other libraries have been loaded. Thus, the addresses in the table
> have to be patched in at runtime-link-time.
Of course. It's quite obvious now that I think about it.
mans at mansr.com
More information about the ffmpeg-devel