add: tmp = data+(tmp-old);
context: proc_data_t *readproctab2(int(*want_proc)(proc_t *buf), int(*want_task)(proc_t *buf), PROCTAB *restrict const PT) {    proc_t** ptab = NULL;    unsigned n_proc_alloc = 0;    unsigned n_proc = 0;    proc_t** ttab = NULL;    unsigned n_task_alloc = 0;    unsigned n_task = 0;    proc_t*  data = NULL;    unsigned n_alloc = 0;    unsigned long n_used = 0;    proc_data_t *pd;    for(;;){        proc_t *tmp;        if(n_alloc == n_used){          //proc_t *old = data;          n_alloc = n_alloc*5/4+30;  // grow by over 25%          data = realloc(data,sizeof(proc_t)*n_alloc);          //if(!data) return NULL;        }        if(n_proc_alloc == n_proc){          //proc_t **old = ptab;          n_proc_alloc = n_proc_alloc*5/4+30;  // grow by over 25%          ptab = realloc(ptab,sizeof(proc_t*)*n_proc_alloc);          //if(!ptab) return NULL;        }        tmp = readproc_direct(PT, data+n_used);        if(!tmp) break;        if(!want_proc(tmp)) continue;        ptab[n_proc++] = (proc_t*)(n_used++);        if(!(  PT->flags & PROC_LOOSE_TASKS  )) continue;        for(;;){          proc_t *t;          if(n_alloc == n_used){            //proc_t *old = data;            n_alloc = n_alloc*5/4+30;  // grow by over 25%            data = realloc(data,sizeof(proc_t)*n_alloc);            //if(!data) return NULL;          }          if(n_task_alloc == n_task){            //proc_t **old = ttab;            n_task_alloc = n_task_alloc*5/4+1;  // grow by over 25%            ttab = realloc(ttab,sizeof(proc_t*)*n_task_alloc);            //if(!ttab) return NULL;          }          t = readtask_direct(PT, tmp, data+n_used);          if(!t) break;          if(!want_task(t)) continue;          ttab[n_task++] = (proc_t*)(n_used++);        }    }    pd = malloc(sizeof(proc_data_t));    pd->proc = ptab;    pd->task = ttab;    pd->nproc = n_proc;    pd->ntask = n_task;    if(PT->flags & PROC_LOOSE_TASKS){      pd->tab = ttab;      pd->n   = n_task;    }else{      pd->tab = ptab;      pd->n   = n_proc;    }    // change array indexes to pointers    while(n_proc--) ptab[n_proc] = data+(long)(ptab[n_proc]);    while(n_task--) ttab[n_task] = data+(long)(ttab[n_task]);    return pd;}