change malloc free table to 2 dimensions links, for speed up

change malloc free table to 2 dimensions links, for speed up