add memprof support && add monitor support && fix mem leak