Windows Memory Mapped Files

后端 未结 4 756
耶瑟儿~
耶瑟儿~ 2021-02-09 07:39

I am trying to investigate the behaviour of the Windows Kernel with respect to Memory Mapped Files / Virtual Memory. Specifically I am interested in determining how frequently t

相关标签:
4条回答
  • 2021-02-09 07:40

    I suggest reading Microsoft Windows Internals by Mark Russinovich and David Solomon, in fifth edition also with Alex Ionescu.

    0 讨论(0)
  • 2021-02-09 07:48

    The internal workings are an implementation detail and subject to change. They're not documented anywhere because Microsoft doesn't want you relying on the details.

    I've got to ask: Why do you care? If you have hard real-time requirements, Windows might not be the OS for you...

    0 讨论(0)
  • 2021-02-09 07:51

    Memory mapped files are controlled by the modified page writer in the kernel - they're flushed whenever the memory that backs the page needs to be re-used (so it can happen under memory pressure).

    The system also keeps track of the number of dirty pages and writes them after a threshold is reached.

    You can find more information about in this article about Windows memory management changes for Windows Vista - it doesn't directly answer your question about how the memory manager treats modified pages but you can infer some of the details based on the information in the article.

    0 讨论(0)
  • 2021-02-09 08:05

    I would suggest that you obtain a copy of

    Microsoft® Windows® Internals Fourth Edition: Microsoft Windows Server 2003 Windows XP and Windows 2000

    There are pdfs floating around in the cyber cloud.

    This is the book done by the "sysinternals" crowd who have written some very good windows utils over the years.

    http://www.microsoft.com/technet/sysinternals

    You will have to read the chapters on

    Memory Management

    Storage Management

    Cache Manager

    File Systems

    They don't directly address your concern but if you manage to read, digest and grasp the very techical paragraphs you can work it out yourself. However if you can predict why Windows does what it does "You are a better man than most".

    Happy brain freeze reading that lot.

    0 讨论(0)
提交回复
热议问题