Paweł Lasek wrote:
A much more important reason might be the fact that memory mapping of
files is only one function of mmap() and company. Basically when you
have mmap() and munmap() you can write your own allocator (which might
be very useful, especially for databases). I won't delve into using it
for I/O, but a specialized memory allocator can get you a big speedup
- after all application developer knows the memory usage pattern of
his app better than kernel/system library.
you can write you own allocator with brk() or
segattach()/segbrk()/segfree() too... the
only things you cant is:
- map on some fixed address
- remap
cinap