On Wed, 13 Apr 2011, Enlightenment SVN wrote:
> +EAPI void
> +eina_file_map_free(Eina_File *file, void *map)
> +{
> + if (file->global_map == map)
> + {
> + file->global_refcount--;
> +
> + if (file->global_refcount > 0) return ;
> +
> + munmap(file->global_map, file->length);
shouldn't you check if file->global_map is MAP_FAILED or not ?
Vincent
> + file->global_map = MAP_FAILED;
> + }
> + else
> + {
> + Eina_File_Map *em;
> + unsigned long int key[2];
> +
> + em = eina_hash_find(file->rmap, &map);
> + if (!em) return ;
> +
> + em->refcount--;
> +
> + if (em->refcount > 0) return ;
> +
> + key[0] = em->offset;
> + key[1] = em->length;
> +
> + eina_hash_del(file->rmap, &map, em);
> + eina_hash_del(file->map, &key, em);
> + }
> +}
> +
> +
>
> Modified: trunk/eina/src/lib/eina_main.c
> ===================================================================
> --- trunk/eina/src/lib/eina_main.c 2011-04-13 13:29:54 UTC (rev 58636)
> +++ trunk/eina/src/lib/eina_main.c 2011-04-13 16:15:30 UTC (rev 58637)
> @@ -124,6 +124,7 @@
> S(ustrbuf);
> S(quadtree);
> S(simple_xml);
> + S(file);
> #undef S
>
> struct eina_desc_setup
> @@ -156,7 +157,8 @@
> S(strbuf),
> S(ustrbuf),
> S(quadtree),
> - S(simple_xml)
> + S(simple_xml),
> + S(file)
> #undef S
> };
> static const size_t _eina_desc_setup_len = sizeof(_eina_desc_setup) /
>
>
> ------------------------------------------------------------------------------
> Forrester Wave Report - Recovery time is now measured in hours and minutes
> not days. Key insights are discussed in the 2010 Forrester Wave Report as
> part of an in-depth evaluation of disaster recovery service providers.
> Forrester found the best-in-class provider in terms of services and vision.
> Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
> _______________________________________________
> enlightenment-svn mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/enlightenment-svn
>
>
------------------------------------------------------------------------------
Forrester Wave Report - Recovery time is now measured in hours and minutes
not days. Key insights are discussed in the 2010 Forrester Wave Report as
part of an in-depth evaluation of disaster recovery service providers.
Forrester found the best-in-class provider in terms of services and vision.
Read this report now! http://p.sf.net/sfu/ibm-webcastpromo
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel