Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

restrict memory use python code

# using resource 
import resource 
 
def limit_memory(maxsize): 
    soft, hard = resource.getrlimit(resource.RLIMIT_AS) 
    resource.setrlimit(resource.RLIMIT_AS, (maxsize, hard))
Source by softhunt.net #
 
PREVIOUS NEXT
Tagged: #restrict #memory #python #code
ADD COMMENT
Topic
Name
4+8 =