Ogranicz pamięć Użyj kodu Pythona

# using resource 
import resource 
 
def limit_memory(maxsize): 
    soft, hard = resource.getrlimit(resource.RLIMIT_AS) 
    resource.setrlimit(resource.RLIMIT_AS, (maxsize, hard))
Outrageous Ostrich