Diff
Not logged in

Differences From Artifact [ba82c769df]:

To Artifact [6168e9bb89]:


645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
    }

    /*
     * Print out the histogram and a few other pieces of information.
     */

    result = (char *)ckalloc((NUM_COUNTERS * 60) + 300);
    sprintf(result, "%u entries in table, %u buckets\n",
	    tablePtr->numEntries, tablePtr->numBuckets);
    p = result + strlen(result);
    for (i = 0; i < NUM_COUNTERS; i++) {
	sprintf(p, "number of buckets with %u entries: %u\n",
		i, count[i]);
	p += strlen(p);
    }
    sprintf(p, "number of buckets with %u or more entries: %u\n",
	    NUM_COUNTERS, overflow);
    p += strlen(p);
    sprintf(p, "average search distance for entry: %.1f", average);
    return result;
}

/*
 *----------------------------------------------------------------------
 *
 * AllocArrayEntry --







|



|



|


|







645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
    }

    /*
     * Print out the histogram and a few other pieces of information.
     */

    result = (char *)ckalloc((NUM_COUNTERS * 60) + 300);
    snprintf(result, 60, "%u entries in table, %u buckets\n",
	    tablePtr->numEntries, tablePtr->numBuckets);
    p = result + strlen(result);
    for (i = 0; i < NUM_COUNTERS; i++) {
	snprintf(p, 60, "number of buckets with %u entries: %u\n",
		i, count[i]);
	p += strlen(p);
    }
    snprintf(p, 60, "number of buckets with %u or more entries: %u\n",
	    NUM_COUNTERS, overflow);
    p += strlen(p);
    snprintf(p, 60, "average search distance for entry: %.1f", average);
    return result;
}

/*
 *----------------------------------------------------------------------
 *
 * AllocArrayEntry --