Python Limit Memory Usage