S
S
Sergey Minakov2019-08-29 16:12:31
JavaScript
Sergey Minakov, 2019-08-29 16:12:31

How to find out how much RAM a subprocess has used?

There is a code that launches a console application. You need to calculate how much memory the application used.

subprocess.check_output(["main.exe"], input=bytes(input_data, "utf-8"), timeout=2)

You also need to terminate the application if it has exceeded a certain memory limit. Are there ways/tools/libraries to do this?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
Gomonov, 2019-08-29
@Gomonov

memory_profiler

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question