X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=app%2Ftest%2Ftest_hash_perf.c;h=842b218f2ded26ef30daa2c8cc063a8eba1aedd8;hb=f2cae314c3d3bf05060012b191dceb79e49061e8;hp=05a88ecaeb5e30e38cd23fe2e489f63443eae4b0;hpb=435eb142bbd7c90299ffce2d389395927b1f7692;p=dpdk.git diff --git a/app/test/test_hash_perf.c b/app/test/test_hash_perf.c index 05a88ecaeb..842b218f2d 100644 --- a/app/test/test_hash_perf.c +++ b/app/test/test_hash_perf.c @@ -448,13 +448,13 @@ run_single_tbl_perf_test(const struct rte_hash *h, hash_operation func, /* Initialise */ num_buckets = params->entries / params->bucket_entries; - key = (uint8_t *) rte_zmalloc("hash key", - params->key_len * sizeof(uint8_t), 16); + key = rte_zmalloc("hash key", + params->key_len * sizeof(uint8_t), 16); if (key == NULL) return -1; - bucket_occupancies = (uint32_t *) rte_zmalloc("bucket occupancies", - num_buckets * sizeof(uint32_t), 16); + bucket_occupancies = rte_calloc("bucket occupancies", + num_buckets, sizeof(uint32_t), 16); if (bucket_occupancies == NULL) { rte_free(key); return -1;