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

Re: Re: [f-cpu] optional SRB



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.

----- Original Message -----
From: <whygee@club-internet.fr>
To: <f-cpu@seul.org>
Sent: Monday, November 25, 2002 2:53 PM
Subject: Re: Re: [f-cpu] optional SRB


>De: Michael Riepe
>
>On Mon, Nov 25, 2002 at 02:52:01AM +0100, Yann Guidon wrote:
>
>> PS : i recently attended a conference about GNU/Hurd and i have
>> seen some Hurd sourcec code. It's very far from POSIX but
>> one of the most crazy things i've seen is ... mmap() used for doing
>> a malloc() .....
>
>Huh? Linux (glibc) does that all the time (and has been doing it for
>many years), if the requested size is big enough.

O gawd ....
Then how do they manage the situations where there is a lot
of fragmentation, or when "garbage collection" must be done ?...

> Michael "Tired" Riepe
YG (back from Mars)

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

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