Test and fix increasing/decreasing memory limit