Erik Hofman wrote:
 > Do you have any idea if the mmap() function is available on all
 > platforms? This is basically like a one shot read of the airports file
 > into memory (but instead leaving it on the drive). It would be easy to
 > search the memory location then.

Bad idea.  This means that the format will be endian-dependant, and
non-portable between x86 and other architectures (like, heh, MIPS).
It's also no faster in practice; the access time for small datasets
like this one is dominated by I/O, the kernel mechanism used is just
noise.

Memory mapping disk files is a technique best used for *big* files,
where the application developer needs both random access and caching
of the data in memory, and wants the OS to do it for them.

Andy

-- 
Andrew J. Ross                NextBus Information Systems
Senior Software Engineer      Emeryville, CA
[EMAIL PROTECTED]              http://www.nextbus.com
"Men go crazy in conflagrations.  They only get better one by one."
  - Sting (misquoted)


_______________________________________________
Flightgear-devel mailing list
[EMAIL PROTECTED]
http://mail.flightgear.org/mailman/listinfo/flightgear-devel

Reply via email to