Chapter 15 -- Using Virtual Memory in Your Own Applications

[Previous] [Next]

Chapter 15

Windows offers three mechanisms for manipulating memory:

  • Virtual memory, which is best for managing large arrays of objects or structures
  • Memory-mapped files, which are best for managing large streams of data (usually from files) and for sharing data between multiple processes running on a single machine
  • Heaps, which are best for managing large numbers of small objects

In this chapter we discuss the first method, virtual memory. Memory-mapped files and heaps are discussed in Chapter 17 and Chapter 18, respectively.

The functions for manipulating virtual memory allow you to directly reserve a region of address space, commit physical storage (from the paging file) to the region, and set your own protection attributes.



Programming Applications for Microsoft Windows
Programming Applications for Microsoft Windows (Microsoft Programming Series)
ISBN: 1572319968
EAN: 2147483647
Year: 1999
Pages: 193

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net