@@ -119,7 +119,6 @@ struct critnib_leaf {
119119
120120struct critnib {
121121 struct critnib_node * root ;
122- uint64_t remove_count ;
123122
124123 /* pool of freed nodes: singly linked list, next at child[0] */
125124 struct critnib_node * deleted_node ;
@@ -129,6 +128,8 @@ struct critnib {
129128 struct critnib_node * pending_del_nodes [DELETED_LIFE ];
130129 struct critnib_leaf * pending_del_leaves [DELETED_LIFE ];
131130
131+ uint64_t remove_count ;
132+
132133 struct utils_mutex_t mutex ; /* writes/removes */
133134};
134135
@@ -173,8 +174,8 @@ struct critnib *critnib_new(void) {
173174 goto err_free_critnib ;
174175 }
175176
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 ));
178179
179180 return c ;
180181err_free_critnib :
@@ -259,7 +260,7 @@ static struct critnib_node *alloc_node(struct critnib *__restrict c) {
259260 struct critnib_node * n = c -> deleted_node ;
260261
261262 c -> deleted_node = n -> child [0 ];
262- VALGRIND_ANNOTATE_NEW_MEMORY (n , sizeof (* n ));
263+ utils_annotate_memory_new (n , sizeof (* n ));
263264
264265 return n ;
265266}
@@ -290,7 +291,7 @@ static struct critnib_leaf *alloc_leaf(struct critnib *__restrict c) {
290291 struct critnib_leaf * k = c -> deleted_leaf ;
291292
292293 c -> deleted_leaf = k -> value ;
293- VALGRIND_ANNOTATE_NEW_MEMORY (k , sizeof (* k ));
294+ utils_annotate_memory_new (k , sizeof (* k ));
294295
295296 return k ;
296297}
@@ -315,7 +316,7 @@ int critnib_insert(struct critnib *c, word key, void *value, int update) {
315316 return ENOMEM ;
316317 }
317318
318- VALGRIND_HG_DRD_DISABLE_CHECKING (k , sizeof (struct critnib_leaf ));
319+ utils_annotate_memory_no_check (k , sizeof (struct critnib_leaf ));
319320
320321 k -> key = key ;
321322 k -> value = value ;
@@ -376,7 +377,7 @@ int critnib_insert(struct critnib *c, word key, void *value, int update) {
376377
377378 return ENOMEM ;
378379 }
379- VALGRIND_HG_DRD_DISABLE_CHECKING (m , sizeof (struct critnib_node ));
380+ utils_annotate_memory_no_check (m , sizeof (struct critnib_node ));
380381
381382 for (int i = 0 ; i < SLNODES ; i ++ ) {
382383 m -> child [i ] = NULL ;
0 commit comments