Limit Python VM memory

On Linux I’m using the resource module:

import resource
resource.setrlimit(resource.RLIMIT_AS, (megs * 1048576L, -1L))

Leave a Comment