pcssecure
asked on
MapViewOfFile memory problem.
Hi,
When calling MapViewOfFile (in winXP environment) repeatedly, Is it normal for the address of the return pointer to keep increasing?
E.g.
m_BmpBits = MapViewOfFile( m_MMFBmpBits, FILE_MAP_ALL_ACCESS, 0, 0, m_BmpSize);
The start address denoted by m_BmpBits keeps increasing when this line is executed repeatedly. When I check the memory usage of the application, it is increased with each iteration.
Do I need to free any memory?
Thanks.
When calling MapViewOfFile (in winXP environment) repeatedly, Is it normal for the address of the return pointer to keep increasing?
E.g.
m_BmpBits = MapViewOfFile( m_MMFBmpBits, FILE_MAP_ALL_ACCESS, 0, 0, m_BmpSize);
The start address denoted by m_BmpBits keeps increasing when this line is executed repeatedly. When I check the memory usage of the application, it is increased with each iteration.
Do I need to free any memory?
Thanks.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
See http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/using_shared_memory_in_a_dynamic_link_library.asp for more details
ASKER
Works. Thanks.