Need to replicate limited memory on hosting account. In php it's a simple as setting memory_limit in the php.ini
config file.
Using VirtualEnv
, and not finding any reference to memory
in its docs.
I've seen coding Solutions for Linux and Unix, but they aren't working on osX (maybe they would with XTools).
The following script on Unix returns the expected MemoryError
on Linux
, but on osX 10.6.8
it just runs Python resources above 2GB
('till ended via the osX Activity Monitor as KeyboardInterrupt doesn't seem to do it).
import resource
"""
python break_resources.py
"""
for n in range(0, 1000000000):
n = n * 100000000000
resource.setrlimit(resource.RLIMIT_CORE, (1, 100))
Experimenting with multiprocessing
so there may be certain solutions which will not work in this case.