MapViewofFile fails because memory not being continuous.
-
Hi, The MapViewOfFile function fails when 1gb of memory is mapped , it seems the memory is not continuous which is causing the problem. Is there any way to overcome this problem. Thanks
-
Hi, The MapViewOfFile function fails when 1gb of memory is mapped , it seems the memory is not continuous which is causing the problem. Is there any way to overcome this problem. Thanks
You have to map only part of the file at a time. To load more of the file unmap the current view and map the new view. This is an excerpt from MSDN - For files that are larger than the address space, you can only map a small portion of the file data at one time. When the first view is complete, you can unmap it and map a new view. To obtain the size of a view, use the VirtualQuery function.
«_Superman_» I love work. It gives me something to do between weekends.