[Mplayer-cvslog] CVS: main/osdep shmem.c,1.9,1.10 shmem.h,1.1.1.1,1.2

Alban Bedel CVS albeu at mplayerhq.hu
Sat Apr 12 15:52:29 CEST 2003


Update of /cvsroot/mplayer/main/osdep
In directory mail:/var/tmp.root/cvs-serv9054/osdep

Modified Files:
	shmem.c shmem.h 
Log Message:
mem mapped area need to be unmapped.


Index: shmem.c
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/shmem.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- shmem.c	2 Apr 2003 16:40:02 -0000	1.9
+++ shmem.c	12 Apr 2003 13:52:21 -0000	1.10
@@ -94,8 +94,15 @@
 }
 }
 
-void shmem_free(void* p){
+void shmem_free(void* p,int size){
   switch(shmem_type){
+    case 0:
+    case 1:
+	    if(munmap(p,size)) {
+		mp_msg(MSGT_OSDEP, MSGL_ERR, "munmap failed on %p %d bytes: %s\n",
+		    p,size,strerror(errno));
+	    }
+      break;
     case 2:
 #ifdef HAVE_SHM
 	    if (shmdt(p) == -1)

Index: shmem.h
===================================================================
RCS file: /cvsroot/mplayer/main/osdep/shmem.h,v
retrieving revision 1.1.1.1
retrieving revision 1.2
diff -u -r1.1.1.1 -r1.2
--- shmem.h	24 Feb 2001 20:30:12 -0000	1.1.1.1
+++ shmem.h	12 Apr 2003 13:52:21 -0000	1.2
@@ -1,4 +1,4 @@
 
 void* shmem_alloc(int size);
-void shmem_free(void* p);
+void shmem_free(void* p,int size);
 



More information about the MPlayer-cvslog mailing list