modify lmn_memstack_reconstruct in  src/memstack.c