IQ7

I allocate memory at Large Memory Area without physical file.Make view of all file into the address space. The available Application space memory is reducing.

HANDLE hFileMapping;
PVOID pMemory;

hFileMapping = CreateFileMapping((HANDLE)INVALID_HANDLE_VALUE,
NULL, PAGE_READWRITE, 0, 0x200000, TEXT("MyMMF"));
if(hFileMapping)
pMemory = MapViewOfFile(hFileMapping, FILE_MAP_WRITE, 0, 0, 0);

Then I want to reduce view of a file into the address space, to work with small part of this file. When close view of file

UnmapViewOfFile(pMemory);

or try to recreate view of file

UnmapViewOfFile(pMemory);
pMemory = MapViewOfFile(hFileMapping, FILE_MAP_WRITE, 0, 0, 200);

nothing to changing. The available Application space memory is not encreasing. And I can work with all file data. UnmapViewofFile return true. What should i do to change view of a file into the address space when i allocate memory at Large Memory Area without physical file



Re: Smart Devices Native C++ Development Memory-Mapped Files On CE Devices

Srikanth Bogadapati

Hi ,

This forum is primarily monitored by Visual Studio for devices group. Please check this link for more appropriate forums for this type of queries.

http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=286724&SiteID=1

Thanks

Srikanth Bogadapati