Problem with ksycoca on windows
Thiago Macieira
thiago at kde.org
Fri Feb 15 13:22:02 GMT 2008
On Friday 15 February 2008 14:05:20 Ralf Habacker wrote:
> Thiago Macieira schrieb:
> > On Friday 15 February 2008 13:22:09 Ralf Habacker wrote:
> >>> We can also dump our mmap code since QFile has mmap support now in 4.4.
> >>
> >> You are refering to QSharedMemory class or something else ?
> >
> > http://doc.trolltech.com/main-snapshot/qfile.html#map
>
> I see, the main interesting point is
> ... A file should be open for a map to succeed but the file does not
> need to stay open after the memory has been mapped.
>
> which means after mapping and closing the file it is internal handled as
> DLL (procexp show it) and could be renamed to make place for an updated
> file. I made a related testcase yesterday.
I thought Windows would lock the file if there were active maps to it.
But it's good to know that it works as expected.
Note, however, that the QFile object must be kept around, even if the file is
closed. It owns the map, so if you destroy it, the mapped memory goes along
with it.
--
Thiago Macieira - thiago (AT) macieira.info - thiago (AT) kde.org
PGP/GPG: 0x6EF45358; fingerprint:
E067 918B B660 DBD1 105C 966C 33F5 F005 6EF4 5358
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-core-devel/attachments/20080215/93daff75/attachment.sig>
More information about the kde-core-devel
mailing list