wrtwarning("junk pointer, too high to make sense\n");
warnx("(%p)", ptr); wrtwarning("ifree: junk pointer, too high to make sense\n");
ifree(void *ptr){    struct pginfo *info;    struct pginfo **pd;    struct pdinfo *pi;    u_long pidx;    u_long index;    /* This is legal */    if (ptr == NULL)	return;    if (!malloc_started) {	wrtwarning("malloc() has never been called\n");	return;    }    /* If we're already sinking, don't make matters any worse. */    if (suicide)	return;    if (malloc_ptrguard && PTR_ALIGNED(ptr))	    ptr = (char *)ptr - PTR_GAP;    index = ptr2index(ptr);    if (index < malloc_pageshift) {	wrtwarning("junk pointer, too low to make sense\n");	return;    }    if (index > last_index) {	wrtwarning("junk pointer, too high to make sense\n");	return;    }    pidx = PI_IDX(index);    pdir_lookup(index, &pi);#ifdef	MALLOC_EXTRA_SANITY    if (pi == NULL || PD_IDX(pi->dirnum) != pidx) {	wrterror("(ES): mapped pages not found in directory\n");	errno = EFAULT;	return;    }#endif	/* MALLOC_EXTRA_SANITY */    if (pi != last_dir) {	prev_dir = last_dir;	last_dir = pi;    }    pd = pi->base;    info = pd[PI_OFF(index)];    if (info < MALLOC_MAGIC)        free_pages(ptr, index, info);    else	free_bytes(ptr, index, info);    return;}