Sandbox your process by setting an upper limit on the amount of RSS or percentage system memory consumed.