aboutsummaryrefslogtreecommitdiff
path: root/src/set
diff options
context:
space:
mode:
Diffstat (limited to 'src/set')
-rw-r--r--src/set/ibf.c2
-rw-r--r--src/set/strata_estimator.c4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/set/ibf.c b/src/set/ibf.c
index 4d40f1f35..152f9b190 100644
--- a/src/set/ibf.c
+++ b/src/set/ibf.c
@@ -78,7 +78,7 @@ ibf_create (uint32_t size, uint8_t hash_num)
78 78
79 /* TODO: use malloc_large */ 79 /* TODO: use malloc_large */
80 80
81 ibf = GNUNET_malloc (sizeof (struct InvertibleBloomFilter)); 81 ibf = GNUNET_new (struct InvertibleBloomFilter);
82 ibf->count = GNUNET_malloc (size * sizeof (uint8_t)); 82 ibf->count = GNUNET_malloc (size * sizeof (uint8_t));
83 ibf->key_sum = GNUNET_malloc (size * sizeof (struct IBF_Key)); 83 ibf->key_sum = GNUNET_malloc (size * sizeof (struct IBF_Key));
84 ibf->key_hash_sum = GNUNET_malloc (size * sizeof (struct IBF_KeyHash)); 84 ibf->key_hash_sum = GNUNET_malloc (size * sizeof (struct IBF_KeyHash));
diff --git a/src/set/strata_estimator.c b/src/set/strata_estimator.c
index c719a5836..a148c1488 100644
--- a/src/set/strata_estimator.c
+++ b/src/set/strata_estimator.c
@@ -89,7 +89,7 @@ strata_estimator_create (unsigned int strata_count, uint32_t ibf_size, uint8_t i
89 89
90 /* fixme: allocate everything in one chunk */ 90 /* fixme: allocate everything in one chunk */
91 91
92 se = GNUNET_malloc (sizeof (struct StrataEstimator)); 92 se = GNUNET_new (struct StrataEstimator);
93 se->strata_count = strata_count; 93 se->strata_count = strata_count;
94 se->ibf_size = ibf_size; 94 se->ibf_size = ibf_size;
95 se->strata = GNUNET_malloc (sizeof (struct InvertibleBloomFilter *) * strata_count); 95 se->strata = GNUNET_malloc (sizeof (struct InvertibleBloomFilter *) * strata_count);
@@ -159,7 +159,7 @@ strata_estimator_dup (struct StrataEstimator *se)
159 struct StrataEstimator *c; 159 struct StrataEstimator *c;
160 int i; 160 int i;
161 161
162 c = GNUNET_malloc (sizeof (struct StrataEstimator)); 162 c = GNUNET_new (struct StrataEstimator);
163 c->strata_count = se->strata_count; 163 c->strata_count = se->strata_count;
164 c->ibf_size = se->ibf_size; 164 c->ibf_size = se->ibf_size;
165 c->strata = GNUNET_malloc (sizeof (struct InvertibleBloomFilter *) * se->strata_count); 165 c->strata = GNUNET_malloc (sizeof (struct InvertibleBloomFilter *) * se->strata_count);