Re: Memory mapped file API failed
- From: "Igor Tandetnik" <itandetnik@xxxxxxxx>
- Date: Tue, 30 Aug 2005 15:32:39 -0400
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
.
- References:
- Memory mapped file API failed
- From: viresh
- Memory mapped file API failed
- Prev by Date: Re: Dynamic linking with symbols
- Next by Date: Re: Single instance DLL
- Previous by thread: Memory mapped file API failed
- Next by thread: Re: Memory mapped file API failed
- Index(es):