@@ -119,7 +119,6 @@ struct critnib_leaf {
119
119
120
120
struct critnib {
121
121
struct critnib_node * root ;
122
- uint64_t remove_count ;
123
122
124
123
/* pool of freed nodes: singly linked list, next at child[0] */
125
124
struct critnib_node * deleted_node ;
@@ -129,6 +128,8 @@ struct critnib {
129
128
struct critnib_node * pending_del_nodes [DELETED_LIFE ];
130
129
struct critnib_leaf * pending_del_leaves [DELETED_LIFE ];
131
130
131
+ uint64_t remove_count ;
132
+
132
133
struct utils_mutex_t mutex ; /* writes/removes */
133
134
};
134
135
@@ -173,8 +174,8 @@ struct critnib *critnib_new(void) {
173
174
goto err_free_critnib ;
174
175
}
175
176
176
- VALGRIND_HG_DRD_DISABLE_CHECKING (& c -> root , sizeof (c -> root ));
177
- VALGRIND_HG_DRD_DISABLE_CHECKING (& c -> remove_count , sizeof (c -> remove_count ));
177
+ utils_annotate_memory_no_check (& c -> root , sizeof (c -> root ));
178
+ utils_annotate_memory_no_check (& c -> remove_count , sizeof (c -> remove_count ));
178
179
179
180
return c ;
180
181
err_free_critnib :
@@ -259,7 +260,7 @@ static struct critnib_node *alloc_node(struct critnib *__restrict c) {
259
260
struct critnib_node * n = c -> deleted_node ;
260
261
261
262
c -> deleted_node = n -> child [0 ];
262
- VALGRIND_ANNOTATE_NEW_MEMORY (n , sizeof (* n ));
263
+ utils_annotate_memory_new (n , sizeof (* n ));
263
264
264
265
return n ;
265
266
}
@@ -290,7 +291,7 @@ static struct critnib_leaf *alloc_leaf(struct critnib *__restrict c) {
290
291
struct critnib_leaf * k = c -> deleted_leaf ;
291
292
292
293
c -> deleted_leaf = k -> value ;
293
- VALGRIND_ANNOTATE_NEW_MEMORY (k , sizeof (* k ));
294
+ utils_annotate_memory_new (k , sizeof (* k ));
294
295
295
296
return k ;
296
297
}
@@ -315,7 +316,7 @@ int critnib_insert(struct critnib *c, word key, void *value, int update) {
315
316
return ENOMEM ;
316
317
}
317
318
318
- VALGRIND_HG_DRD_DISABLE_CHECKING (k , sizeof (struct critnib_leaf ));
319
+ utils_annotate_memory_no_check (k , sizeof (struct critnib_leaf ));
319
320
320
321
k -> key = key ;
321
322
k -> value = value ;
@@ -376,7 +377,7 @@ int critnib_insert(struct critnib *c, word key, void *value, int update) {
376
377
377
378
return ENOMEM ;
378
379
}
379
- VALGRIND_HG_DRD_DISABLE_CHECKING (m , sizeof (struct critnib_node ));
380
+ utils_annotate_memory_no_check (m , sizeof (struct critnib_node ));
380
381
381
382
for (int i = 0 ; i < SLNODES ; i ++ ) {
382
383
m -> child [i ] = NULL ;
0 commit comments