Can you stop memory from being swapped to disk?

后端 未结 7 995
北恋
北恋 2021-01-02 02:59

I was wondering if it was possible to prevent memory of a object (class or struct) from being swapped to disk?

Edit: As for why I\'ve been told some of the data I\'m

7条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-02 03:39

    Not really, that's an operating system thing.

    Just rest assured that Windows' paging strategy will prioritize keeping in memory the most frequently accessed pages, so if a certain page is important for your application, it'll be there as much as possible.

提交回复
热议问题