I am using a module and sometimes it crashes, because of memory consumption. It is terminated by SIGKILL 9 and the script is interrupted. However I cannot access the loop in which the memory consumption happens.
This is how it looks now:
import module
output = module.function(args)
and this sort of how it should look like:
import module
if ramconsumption(module.function(args)) > 999:
output = None
else:
output = module.function(args)
Do you know a way on how to implement this? My example is just for better understanding, the solution should just be one where I do not get a SIGKILL, when too much memory is consumed.