O
O
Oleg Aksenov2018-05-22 09:26:53
Windows
Oleg Aksenov, 2018-05-22 09:26:53

Can I make a reservation or limit the use of RAM?

Good day, I’m interested in one moment in windows servers and in the client version it’s also curious, there are programs, utilities or other objects that can have a memory leak in themselves, and in fact this leak reaches 100% of the used memory, regardless of the amount after a certain quantity all will be consumed.
The question is, is it possible to make a reservation of some amount of memory that the admin can use to connect, or a memory limit per process?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
R
res2001, 2018-05-22
@res2001

If the software is 32bit, then it will not be able to consume more than 4 G of memory. In this case, there may be more physical memory. 64-bit software has a much larger memory limit.
As an option, run the software in a virtual machine that has a limited amount of memory allocated.
Complain to the developer, let him fix the bugs.

A
andrew-nii, 2018-07-17
@andrew-nii

Well, suppose we have a detection that the program has eaten more memory than necessary. what are we going to do to her? make VirtualAlloc return an error? practice shows that 99 percent of software from such behavior falls on unhandled exception. and the 8/10 itself goes into BSOD with colossal data losses (!), if there is not enough memory (I don’t know about servers).
I don't know of any ready-made solutions. but running QuerySystemInformation in a loop, and somehow telling the program that, they say, that's enough, right up to TerminateProcess / CreateProcess - is a couple of pages of code. Or maybe there are ready-made solutions on github. or you can yandex delphi, QuerySystemInformation, delphi, How to kill / how to start the process. Pascal must have been somewhere, right?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question