Enlightenment CVS committal

Author  : raster
Project : e17
Module  : libs/evas

Dir     : e17/libs/evas/src/lib/engines/common


Modified Files:
        evas_image_main.c 


Log Message:


1. dont free/realoc if no_free is set.
2. free then malloc otherwise realloc might ALSO have to memcpy if it cant
resize the segment whihc means overhead we dont need/want.

===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/engines/common/evas_image_main.c,v
retrieving revision 1.61
retrieving revision 1.62
diff -u -3 -r1.61 -r1.62
--- evas_image_main.c   15 Apr 2008 15:20:53 -0000      1.61
+++ evas_image_main.c   3 May 2008 06:38:45 -0000       1.62
@@ -153,7 +153,14 @@
    else
      siz = w * h * sizeof(DATA32);
 
-   im->image.data = realloc(im->image.data, siz);
+   if (im->image.no_free)
+     im->image.data = malloc(siz);
+   else
+     {
+//     im->image.data = realloc(im->image.data, siz);
+       if (im->image.data) free(im->image.data);
+       im->image.data = malloc(siz);
+     }
    if (im->image.data == NULL) return -1;
 
 #ifdef HAVE_VALGRIND



-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to