[FFmpeg-devel] [RFC] AES init

Rich Felker dalias
Mon May 14 01:54:53 CEST 2007

On Sun, May 13, 2007 at 09:39:02PM +0200, Michael Niedermayer wrote:
> i wish there where a inited-rodata which would be shareable between
> processes and the kernel would just throw the data away if it needed
> the memory and call the init code again if it needed the table again ...

this is basically impossible to do in any way that's secure, and even
if you could do it, it wouldn't be portable. compressed binaries or
compressed filesystem would achieve virtually the same thing, given a
good compression algorithm.

i agree that putting 500meg table in rodata/text is bad, but i don't
think this is a practical situation we'll encounter. for tables 1-16k
in size, while they might be larger than the code to generate the
table, they're still a very small portion of the whole program size,
and imo the reliability (no thread issues/race conditions) and
sharability outweigh a few kb of disk space.


More information about the ffmpeg-devel mailing list