RAM Limitation Using CPP Application

I have 3 GB of RAM. Is there a way to allocate only 512 MB of RAM for a C ++ application?

Else

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

Thanks Ashok

+3
source share
1 answer

Use SetProcessWorkingSetSize ()

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

+4
source

Source: https://habr.com/ru/post/1796197/


All Articles