given the followng code, am i right to say that pointer r and ptr will be the same if the location of the memory does change? r will only take a new position if it needs to shift to another part of the memory? thanks
Code:void* realloc(void *ptr, size_t size) { static void* (*func)(); void *r; if(!func) { func = (void *(*)())dlsym(RTLD_NEXT, "realloc"); } r = func(ptr, size); printf("realloc %p %d %p\n", r, size, ptr); return r; }