Re: Memory mapped file API failed

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



viresh <viresh@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
> I am using the following sequence of calls for creating a memory
> mapped view of the file.
> For some reason if the file size is 17 GB the API fails. Is here some
> limitation on the API?
>
> CreateFileMappingW followed by
> MapViewOfFile - Fails .The returned handle is NULL

You do not try to map all 17GB at once, do you? You don't have that much
address space. When working with large files like this, you can use
MapViewOfFile and UnmapViewOfFile repeatedly to map small areas, or
views, of the file into memory.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.