add memory monitor test code