[MPlayer-dev-eng] Re: amd64 -sws 0 fix (iow: playing with NX bit)

Aurelien Jacobs aurel at gnuage.org
Wed Jan 26 14:14:30 CET 2005


On Tue, 25 Jan 2005 19:58:36 +0100
Reimar Döffinger <uvhe at rz.uni-karlsruhe.de> wrote:

> On Tue, Jan 25, 2005 at 02:00:36PM +0100, Aurelien Jacobs wrote:
> > On Tue, 25 Jan 2005 10:22:07 +0100
> > Reimar Döffinger <Reimar.Doeffinger at stud.uni-karlsruhe.de> wrote:
> > > mmap always allocates full pages AFAIK, so no need to use or know PAGESIZE there.
> > 
> > Ok, that's nice :-)
> 
> Always depends on what you want to do ;-). It is rather low-level, I'd
> say...
> 
> >  #else
> >  #include <stdlib.h>
> >  #endif
> > +#ifdef HAVE_SYS_MMAN_H
> > +#include <sys/types.h>
> 
> At least I don't need types.h...

Neither do I... It was simply there in the original patch so I didn't
touched it.

> > +                        c->funnyYCode = (uint8_t*)memalign(32, MAX_FUNNY_CODE_SIZE);
> > +                        c->funnyUVCode = (uint8_t*)memalign(32, MAX_FUNNY_CODE_SIZE);
> > +#endif
> > +
> >  			c->lumMmx2Filter   = (int16_t*)memalign(8, (dstW        /8+8)*sizeof(int16_t));
> 
> You use a different indentation than the other code here...

Right... I took care about this in the first version of the patch and
then forgot about it.

> > +#ifdef HAVE_SYS_MMAN_H
> > +	if(c->funnyYCode) munmap(c->funnyYCode, MAX_FUNNY_CODE_SIZE);
> > +	c->funnyYCode=NULL;
> > +	if(c->funnyUVCode) munmap(c->funnyUVCode, MAX_FUNNY_CODE_SIZE);
> > +	c->funnyUVCode=NULL;
> > +#else
> > +	if(c->funnyYCode) free(c->funnyYCode);
> > +	c->funnyYCode=NULL;
> > +	if(c->funnyUVCode) free(c->funnyUVCode);
> > +	c->funnyUVCode=NULL;
> > +#endif
> 
> hmm.. maybe put the = NULL lines outside the #ifdef (two lines less like
> that ;-) )

Ok, updated patch attached.

Aurel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: mprotect6.diff
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-dev-eng/attachments/20050126/07dff328/attachment.asc>


More information about the MPlayer-dev-eng mailing list