pass old size to custom realloc function