[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Re: Re: [f-cpu] optional SRB


>De: "Christophe Avoinne"
>Personnaly, I use mmap() a lot when I need to read or write a file with
>complex structures. That way, I access the file as if it is a memory thru
>word or structure pointers. It is very convenient for a search algorithm or
>creating a structural file. You don't need to explicetely use lseek(),
>read() or write() functions, just a msync() or a munmap() then a close() at
>the end. Not speaking about the share and access rights you can give at this memory.

That is fine on an Alpha or any other true 64-bit computer.

The problem is ... doing mmap all the time on a 32-bit machine
is a big source of limitations and annoyances.

First example : GNU/Hurd's ext2 "translator" does not accept
partitions that are larger than a bit less than 2GB on x86.
why ? because the developper originally thought it is easier
to mmap the WHOLE partition. ghaaaaaaaaaaa.....

Another example : at work, i have to deal with huge DNA and
protein sequence databases which are several megabytes.
However, the most widely used sequencing program (from NCBI)
has the naughty habit of mmap()ing almost everything !
This creates a lot of very naughty troubles.

mmap works nicely when communicating with devices (/dev/fb
for example). however, before we have a full 64-bit
architecture, its use must be very carefully analysed
otherwise it can become a nightmare. Now, when it comes
to F-CPU, there should not be a problem (just in case
one wondered ;-D)


To unsubscribe, send an e-mail to majordomo@seul.org with
unsubscribe f-cpu       in the body. http://f-cpu.seul.org/