use eina mmap safety.
authorraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 4 Jul 2011 09:44:11 +0000 (09:44 +0000)
committerraster <raster@7cbeb6ba-43b4-40fd-8cce-4c39aea84d33>
Mon, 4 Jul 2011 09:44:11 +0000 (09:44 +0000)
git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/evas@60982 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33

src/lib/canvas/evas_object_image.c
src/lib/cserve/evas_cs_mem.c
src/modules/loaders/generic/evas_image_load_generic.c

index 0bcb926..86f370c 100644 (file)
@@ -212,6 +212,9 @@ _create_tmpf(Evas_Object *obj, void *data, int size, char *format __UNUSED__)
         return;
      }
    unlink(buf);
+   
+   eina_mmap_safety_enabled_set(EINA_TRUE);
+   
    dst = mmap(NULL, size, 
               PROT_READ | PROT_WRITE, 
               MAP_SHARED, 
index c1a9782..4532a1b 100644 (file)
@@ -46,6 +46,9 @@ evas_cserve_mem_new(int size, const char *name)
         free(m);
         return NULL;
      }
+
+   eina_mmap_safety_enabled_set(EINA_TRUE);
+   
    m->data = mmap(NULL, m->size, PROT_READ | PROT_WRITE, MAP_SHARED, m->fd, 0);
    if (m->data == MAP_FAILED)
      {
index 754ecb3..83b10e0 100644 (file)
@@ -326,6 +326,8 @@ getdata:
                {
                   void *addr;
 
+                  eina_mmap_safety_enabled_set(EINA_TRUE);
+                  
                   // mmap
                   addr = mmap(NULL, w * h * sizeof(DATA32),
                               PROT_READ, MAP_SHARED, fd, 0);