Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

MapViewOfFile memory problem.

Posted on 2004-04-16
3
Medium Priority
?
467 Views
Last Modified: 2013-11-20
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
Comment
Question by:pcssecure
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 16

Accepted Solution

by:
nonubik earned 2000 total points
ID: 10841060
You need to call UnmapViewOfFile(m_BmpBits) for each MapViewOfFile.
0
 

Author Comment

by:pcssecure
ID: 10841123
Works. Thanks.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question