• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 469
  • Last Modified:

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.
0
pcssecure
Asked:
pcssecure
  • 2
1 Solution
 
nonubikCommented:
You need to call UnmapViewOfFile(m_BmpBits) for each MapViewOfFile.
0
 
pcssecureAuthor Commented:
Works. Thanks.
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now