开发者

Limit RAM Usage to a CPP application

开发者 https://www.devze.com 2023-02-14 22:13 出处:网络
I have 3 GB RAM. Is there a way to allocate only 512MB of R开发者_StackOverflow中文版AM to a C++ application?

I have 3 GB RAM. Is there a way to allocate only 512MB of R开发者_StackOverflow中文版AM to a C++ application?

Else

Is there a way to reduce my RAM to 512MB for a while for testing purpose?

Thanks, Ashok


Use SetProcessWorkingSetSize()

Sets the minimum and maximum working set sizes for the specified process.

0

精彩评论

暂无评论...
验证码 换一张
取 消