views:

50

answers:

1

When displaying a large, memory mapped file in a scrollable box, is it more appropriate to have the view represent the whole file, or only the region of the file currently being displayed?
More broadly, at what level of the abstraction is paging done with .Net's memory mapped files? Is the page size/amount of the file held in memory related to the MemoryMappedViewAccessors, or is it independent of these objects?

+1  A: 

It is independent; data is not copied into memory until the address (or a nearby address) is accessed. However, the size of the view counts against your process's address space. This is really important on 32-bit systems since the process address space is limited to 2GB or 3GB. This impacts the ability to do future allocations due to the possibility that a contiguous block of the desired size might not being available in the address space.

The ability to use large views is often cited as a major advantage of 64-bit systems.

binarycoder