fix some bugs,add macro debug at mem_ops.h