[Thunar-workers] [DokuWiki] page changed: implementation:mime-glob-match

thunar-workers at xfce.org thunar-workers at xfce.org
Wed Mar 9 00:53:57 CET 2005


A page in your DokuWiki was added or changed. Here are the details:

Date        : 2005/03/08 23:53
Browser     : Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.5) Gecko/20050122 Firefox/1.0
IP-Address  : 217.85.185.87
Hostname    : pD955B957.dip.t-dialin.net
Old Revision: http://thunar.xfce.org/wiki/implementation:mime-glob-match?rev=1110324245
New Revision: http://thunar.xfce.org/wiki/implementation:mime-glob-match
Edit Summary: 
User        : benny

@@ -109,8 +109,25 @@
  a C array here; but instead we'll use a large memory chunk (which
  will also include the Simple Patterns) to reduce **heap fragmentation**
  and increase **data locality**, and store the pattern data depending
  on the platform (data alignment!).
+ 
+ FIXME From the top of my head (ia32): ''malloc()'' or ''mmap()'' a
+ block of memory (together with the other pattern types) with a base
+ alignment of 16 byte (''mmap()'' does this and ''malloc()'' on BSD and
+ Solaris, dunno about glibc); the size of the memory block can easily
+ be calculated from the parsed ''globs'' data. For each literal pattern,
+ have a pointer to the next or ''NULL'' for the last element, a pointer
+ to the MIME type (or something else that identifies a MIME type uniquely,
+ like an index into the MIME type table) and the pattern string data. On ia32:
+ The former two are 4 byte each. The size of the pattern string data
+ should be rounded up to the next multiple of 4 then. While the focus is
+ on ia32 currently (as that's the common case), the implementation should
+ at best automatically figure a good value for other platforms here (at
+ best w/o depending on autoconf checks, which would break cross-compiling).
+ 
+ FIXME Calculate the size required for this approach in the Shared MIME
+ Database analysis tool, and try to evaluate worst-case scenarios.
  
  :!: More research required.
  
  



-- 
This mail was generated by DokuWiki at
http://thunar.xfce.org/wiki/



More information about the Thunar-workers mailing list