X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvppinfra%2Fheap.h;h=22fc335c07283bcc2f964ad30912e9150e5c3393;hb=07bbaef593939e9d03ba131e03296587472514ce;hp=8c1aae46ebf912a8ca059fcab9ba4f61219f31c3;hpb=7cd468a3d7dee7d6c92f69a0bb7061ae208ec727;p=vpp.git diff --git a/src/vppinfra/heap.h b/src/vppinfra/heap.h index 8c1aae46ebf..22fc335c072 100644 --- a/src/vppinfra/heap.h +++ b/src/vppinfra/heap.h @@ -137,7 +137,7 @@ typedef struct format_function_t *format_elt; - /* Used for validattion/debugging. */ + /* Used for validation/debugging. */ uword *used_elt_bitmap; /* First and last element of doubly linked chain of elements. */ @@ -150,7 +150,7 @@ typedef struct u32 flags; /* Static heaps are made from external memory given to - us by user and are not re-sizeable vectors. */ + us by user and are not re-sizable vectors. */ #define HEAP_IS_STATIC (1) } heap_header_t; @@ -204,7 +204,7 @@ _heap_dup (void *v_old, uword v_bytes) HEAP_DATA_ALIGN); h_new = heap_header (v_new); heap_dup_header (h_old, h_new); - clib_memcpy (v_new, v_old, v_bytes); + clib_memcpy_fast (v_new, v_old, v_bytes); return v_new; } @@ -220,7 +220,7 @@ uword heap_bytes (void *v); always_inline void * _heap_new (u32 len, u32 n_elt_bytes) { - void *v = _vec_resize (0, len, (uword) len * n_elt_bytes, + void *v = _vec_resize ((void *) 0, len, (uword) len * n_elt_bytes, sizeof (heap_header_t), HEAP_DATA_ALIGN); heap_header (v)->elt_bytes = n_elt_bytes; @@ -260,7 +260,7 @@ heap_create_from_memory (void *memory, uword max_len, uword elt_bytes) return 0; h = memory; - memset (h, 0, sizeof (h[0])); + clib_memset (h, 0, sizeof (h[0])); h->max_len = max_len; h->elt_bytes = elt_bytes; h->flags = HEAP_IS_STATIC;