move MemoryWatcher to common