[MPlayer-dev-eng] [PATCH] mga_vid memleak fix

D Richard Felker III dalias at aerifal.cx
Sun Feb 3 19:50:24 CET 2002


On Sun, Feb 03, 2002 at 06:57:11PM +0100, Attila Kinali wrote:
> On Sun, 3 Feb 2002 12:38:17 -0500
> D Richard Felker III <dalias at aerifal.cx> wrote:
> 
> 
> > i've already patched my copy, but i've probably skipped too much
> > memory -- i don't know exactly how much matroxfb needs for the font.
> > is it ok to lose say 16k or so to ensure that we stay a plenty far
> > away even when there's a fairly large font?
> 
> Make it a compile time option, people with just 8mb ram need every byte.
> 
> IMHO the proper way would be to store the memory range before overwrting
> it and restoring it after closing the char driver.
> But this shouldnt be done with kmalloc, but rather with vmalloc
> (we dont need physical continous memory for a buffer).
> If implemented this should also be a compile time option.

well see, that's not enough -- mplayer's text output gets trashed
while it's playing even, as does any other text that gets printed,
e.g. if you switch to another console to irc or something while the
movie is playing.

fyi, i only have 8 megs, and it's more than enough for mga_vid even
with the font-preserving hack i put in. but, it probably would make
the most sense to make the amount of memory skipped for font space a
module loadtime option, so that users can just configure it in
modules.conf. sound good?

rich




More information about the MPlayer-dev-eng mailing list