On Sat, Mar 15, 2014 at 12:23 PM, Jeff Grimshaw
<[email protected]> wrote:
> So I am going through Eina, working on improving the documentation and I
> have come to the struct _Eina_File in eina_file_common.h.  Some of it makes
> sense, but I'm not at all clear on the function of these members:
>
> Eina_Hash *map

Used to search for a similar eina_file_map_new request (with offset
and length as a key, was to much effort and not enough usage to handle
the case where it would fit in an existing map, but not the same exact
tuple of offset/length)

> Eina_Hash *rmap

The opposite of the previous map. Used to find when you have a pointer
to which mapping it belong.

> void *global_map

Used when you map the whole file. Most common case in EFL, most used
one and optimized for that case.

> Eina_List *dead_map

The list of faulted mapping. When a file is corrupted on disk you get
a sigbus at the time of the mapping access. Eina catch that and
replace the faulty page with a map on /dev/zero and remember the page
that did fault. It is possible to later on check if the page did fault
or not. Common use case for file copying, but not really useful for
efl normal file access as most system will detect a problem as soon as
they start getting 0 and fault due to that. Which explain why we don't
check that often for this value.

> My theory is that they have something to do with memory mapped portions of
> the file, but I'm guessing.  I've tried to discover the function of these
> members by reading the code that uses them, but it's still not clear.
>
> Anyone have a clue what these do?
>
> I considered asking this on #edevelop, but I suspect the answer might be
> lengthy.

Who knows :-)
-- 
Cedric BAIL

------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/13534_NeoTech
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to