24 soft, hard = resource.getrlimit( what )
25 if soft < hard
or ( hard == -1
and soft != hard ):
26 log.debug(
'setting soft %s limit to %s (was: %s)', descr,
27 hard == -1
and 'unlimited' or str(hard),
28 soft == -1
and 'unlimited' or str(soft), )
30 resource.setrlimit( what, (hard,hard) )
32 if what != resource.RLIMIT_AS
or hard != -1:
raise
34 if platform.architecture()[0] !=
'32bit':
raise
35 if platform.machine()
in [
'i386',
'i486',
'i586',
'i686']:
raise