add test case for memory limit