add NonMemoMode

Please clean up unused code.