Add check memory method