(Windows) Don't create a file mapping for each view that is mapped
commit512c2284cafb3eb23d06fc5cdc4e424b711a04b7
authorJoão Abecasis <joao@abecasis.name>
Wed, 7 Oct 2009 15:42:39 +0000 (7 17:42 +0200)
committerJoão Abecasis <joao@abecasis.name>
Wed, 21 Oct 2009 11:46:06 +0000 (21 13:46 +0200)
tree01ca4c0a62e14d1e7e28d89ec7fcc7aa7f4a0610
parent0689a85ca20a36808b388efc452892606d47b34d
(Windows) Don't create a file mapping for each view that is mapped

Creating a file mapping for each view mapped to memory is sub-optimal
and slow. With this change, a single mapping is created and reused when
mapping subsequent views of the file.

The handle returned from CreateFileForMapping (used in WinCE 5) is now
discarded, since the kernel manages it automatically with the file
mapping. This simplifies use of the deprecated map API.

Reviewed-by: Maurice Kalinowski
Reviewed-by: Marius Storm-Olsen
src/corelib/io/qfsfileengine.cpp
src/corelib/io/qfsfileengine_p.h
src/corelib/io/qfsfileengine_win.cpp