Force allocating real memory

后端 未结 1 1023
忘了有多久
忘了有多久 2021-01-26 02:55

Is it possible to allocate big chunk (512Mb-1Gb with 4Gb installed) of real memory without dropping it to swap?

My final intention is to free system memory: os x has a p

相关标签:
1条回答
  • 2021-01-26 03:12

    The mlock function will lock pages into physical memory. I'm not sure what the limits are.

    You should be extremely sure you really want to do this. It's not a nice thing to do to the rest of the system.

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