debug rmqueue_smallest and add mem_test.c