[MPlayer-dev-eng] Re: amd64 -sws 0 fix (iow: playing with NX bit)
Reimar Döffinger
uvhe at rz.uni-karlsruhe.de
Wed Jan 26 00:47:27 CET 2005
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...
> + 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...
> +#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 ;-) )
Greetings,
Reimar Döffinger
P.S.: Sorry if there are several version of this mail, seems our RZ now
modifies the from field to its liking, so they got stuck :-(
More information about the MPlayer-dev-eng
mailing list