fix bugs: mem.c, add feature: hlist travel