fix a bug of algo
in previous version the memlist will store the current_mem if it's 0, but we don't need that value, so I just remove it.