void reorder(char *memory, INT32 nitems, INT32 size,INT32 *order);
mem_copy=copy_memory(memory); for(int e=0;e<nitems;e++)