简体   繁体   中英

How to limit memory per thread to avoid CPU to use pagefile memory

I would like to know is there a way to limit the memory per thread so that when the memory being used by all the existing processes exceeds the available RAM, the operating system will not moves virtual address spaces to the computer's hard disk but instead it will wait for other thread ended and free the memory then only another thread will start. The reason to do this is when computer start using the page file it will largely slow down the whole process and it runs even slower than a single thread process.

There is no "per-thread" memory limits in .Net applications since memory is allocated from shared pool (per AppDomain).

I also believe there is no such restriction for native processes (essentially for the same reason - memory normally not tagged by the system with thread which allocated the memory).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM