session: allow builtin apps to register names
[vpp.git] / src / vppinfra / mem.h
index b566e8d..55a276f 100644 (file)
@@ -328,6 +328,7 @@ typedef struct
 #define CLIB_MEM_VM_F_NUMA_PREFER (1 << 2)
 #define CLIB_MEM_VM_F_NUMA_FORCE (1 << 3)
 #define CLIB_MEM_VM_F_HUGETLB_PREALLOC (1 << 4)
+#define CLIB_MEM_VM_F_LOCKED (1 << 5)
   u32 flags; /**< vm allocation flags:
                 <br> CLIB_MEM_VM_F_SHARED: request shared memory, file
                descriptor will be provided on successful allocation.
@@ -337,6 +338,7 @@ typedef struct
                <br> CLIB_MEM_VM_F_NUMA_FORCE: fail if setting numa policy fails.
                <br> CLIB_MEM_VM_F_HUGETLB_PREALLOC: pre-allocate hugepages if
                number of available pages is not sufficient.
+               <br> CLIB_MEM_VM_F_LOCKED: request locked memory.
              */
   char *name; /**< Name for memory allocation, set by caller. */
   uword size; /**< Allocation size, set by caller. */
@@ -360,8 +362,9 @@ typedef struct
   uword requested_va;  /**< Request fixed position mapping */
   void *addr;          /**< Pointer to mapped memory, if successful */
 } clib_mem_vm_map_t;
-clib_error_t *clib_mem_vm_ext_map (clib_mem_vm_map_t * a);
 
+clib_error_t *clib_mem_vm_ext_map (clib_mem_vm_map_t * a);
+void clib_mem_vm_randomize_va (uword * requested_va, u32 log2_page_size);
 
 #include <vppinfra/error.h>    /* clib_panic */