functions to enforce memory limits on reasoner processes