mirror of https://github.com/mpv-player/mpv
disable ddebug printfs
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@499 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
23a33e55a4
commit
4b6d71715f
|
@ -41,13 +41,13 @@ while(1){
|
||||||
case 0: // ========= MAP_ANON|MAP_SHARED ==========
|
case 0: // ========= MAP_ANON|MAP_SHARED ==========
|
||||||
p=mmap(0,size,PROT_READ|PROT_WRITE,MAP_ANON|MAP_SHARED,-1,0);
|
p=mmap(0,size,PROT_READ|PROT_WRITE,MAP_ANON|MAP_SHARED,-1,0);
|
||||||
if(p==MAP_FAILED) break; // failed
|
if(p==MAP_FAILED) break; // failed
|
||||||
printf("shmem: %d bytes allocated using mmap anon (%X)\n",size,p);
|
// printf("shmem: %d bytes allocated using mmap anon (%X)\n",size,p);
|
||||||
return p;
|
return p;
|
||||||
case 1: // ========= MAP_SHARED + /dev/zero ==========
|
case 1: // ========= MAP_SHARED + /dev/zero ==========
|
||||||
if ((devzero = open("/dev/zero", O_RDWR, 0)) == -1) break;
|
if ((devzero = open("/dev/zero", O_RDWR, 0)) == -1) break;
|
||||||
p=mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,devzero,0);
|
p=mmap(0,size,PROT_READ|PROT_WRITE,MAP_SHARED,devzero,0);
|
||||||
if(p==MAP_FAILED) break; // failed
|
if(p==MAP_FAILED) break; // failed
|
||||||
printf("shmem: %d bytes allocated using mmap /dev/zero (%X)\n",size,p);
|
// printf("shmem: %d bytes allocated using mmap /dev/zero (%X)\n",size,p);
|
||||||
return p;
|
return p;
|
||||||
case 2: { // ========= shmget() ==========
|
case 2: { // ========= shmget() ==========
|
||||||
struct shmid_ds shmemds;
|
struct shmid_ds shmemds;
|
||||||
|
@ -63,7 +63,7 @@ while(1){
|
||||||
if (shmdt(p) == -1) perror ("shmdt()");
|
if (shmdt(p) == -1) perror ("shmdt()");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
printf("shmem: %d bytes allocated using shmget() & shmat() (%X)\n",size,p);
|
// printf("shmem: %d bytes allocated using shmget() & shmat() (%X)\n",size,p);
|
||||||
return p;
|
return p;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Loading…
Reference in New Issue