Limit Python Memory Resources on osX / VirtualEnv like php.ini memory_limit -
need replicate limited memory on hosting account. in php it's simple setting memory_limit in php.ini config file.
using virtualenv, , not finding reference memory in docs.
i've seen coding solutions linux , unix, aren't working on osx (maybe xtools).
the following script on unix returns expected memoryerror on linux, on osx 10.6.8 runs python resources above 2gb ('till ended via osx activity monitor keyboardinterrupt doesn't seem it).
import resource """ python break_resources.py """ n in range(0, 1000000000): n = n * 100000000000 resource.setrlimit(resource.rlimit_core, (1, 100)) experimenting multiprocessing there may solutions not work in case.
Comments
Post a Comment