aboutsummaryrefslogtreecommitdiffstats
path: root/src/vppinfra/mem_bulk.c
diff options
context:
space:
mode:
authorDamjan Marion <damarion@cisco.com>2022-04-05 12:40:31 +0200
committerBeno�t Ganne <bganne@cisco.com>2022-04-05 14:46:15 +0000
commit79934e855fc58aefde498cd0564796cdd6ccbc59 (patch)
treedb3c5a33e1146915572160c33f2a0a8c9cbd18cd /src/vppinfra/mem_bulk.c
parent0c740a6d8a6c11b1af4ce704220c2c46628f0a89 (diff)
vppinfra: refactor address sanitizer
Type: refactor Change-Id: I5ca142ec1557d5b5c3806b43553ad9d3b5ea1112 Signed-off-by: Damjan Marion <damarion@cisco.com>
Diffstat (limited to 'src/vppinfra/mem_bulk.c')
-rw-r--r--src/vppinfra/mem_bulk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/vppinfra/mem_bulk.c b/src/vppinfra/mem_bulk.c
index ba8b2e94909..4dd6a168217 100644
--- a/src/vppinfra/mem_bulk.c
+++ b/src/vppinfra/mem_bulk.c
@@ -66,7 +66,7 @@ clib_mem_bulk_init (u32 elt_sz, u32 align, u32 min_elts_per_chunk)
if (min_elts_per_chunk == 0)
min_elts_per_chunk = CLIB_MEM_BULK_DEFAULT_MIN_ELTS_PER_CHUNK;
- CLIB_MEM_UNPOISON (b, sizeof (clib_mem_bulk_t));
+ clib_mem_unpoison (b, sizeof (clib_mem_bulk_t));
clib_memset (b, 0, sizeof (clib_mem_bulk_t));
b->mspace = heap->mspace;
b->align = align;
@@ -92,7 +92,7 @@ again:
while (c)
{
next = c->next;
- CLIB_MEM_POISON (c, bulk_chunk_size (b));
+ clib_mem_poison (c, bulk_chunk_size (b));
mspace_free (ms, c);
c = next;
}
@@ -104,7 +104,7 @@ again:
goto again;
}
- CLIB_MEM_POISON (b, sizeof (clib_mem_bulk_t));
+ clib_mem_poison (b, sizeof (clib_mem_bulk_t));
mspace_free (ms, b);
}
@@ -148,7 +148,7 @@ clib_mem_bulk_alloc (clib_mem_bulk_handle_t h)
{
u32 i, sz = bulk_chunk_size (b);
c = mspace_memalign (b->mspace, b->chunk_align, sz);
- CLIB_MEM_UNPOISON (c, sz);
+ clib_mem_unpoison (c, sz);
clib_memset (c, 0, sizeof (clib_mem_bulk_chunk_hdr_t));
b->avail_chunks = c;
c->n_free = b->elts_per_chunk;
@@ -192,7 +192,7 @@ clib_mem_bulk_free (clib_mem_bulk_handle_t h, void *p)
{
/* chunk is empty - give it back */
remove_from_chunk_list (&b->avail_chunks, c);
- CLIB_MEM_POISON (c, bulk_chunk_size (b));
+ clib_mem_poison (c, bulk_chunk_size (b));
mspace_free (b->mspace, c);
return;
}