vppinfra: support main heap with different page sizes
[vpp.git] / src / vppinfra / pmalloc.h
index eae317f..f7ae584 100644 (file)
@@ -36,7 +36,6 @@ typedef struct
 {
   u32 index;
   u32 arena_index;
-  uword pa;
   clib_pmalloc_chunk_t *chunks;
   u32 first_chunk_index;
   u32 n_free_chunks;
@@ -68,10 +67,7 @@ typedef struct
   u8 *base;
 
   /* default page size - typically 2M */
-  u32 def_log2_page_sz;
-
-  /* system page size - typically 4K */
-  u32 sys_log2_page_sz;
+  clib_mem_page_sz_t def_log2_page_sz;
 
   /* maximum number of pages, limited by VA preallocation size */
   u32 max_pages;
@@ -104,7 +100,7 @@ typedef struct
 } clib_pmalloc_main_t;
 
 
-int clib_pmalloc_init (clib_pmalloc_main_t * pm, uword size);
+int clib_pmalloc_init (clib_pmalloc_main_t * pm, uword base_addr, uword size);
 void *clib_pmalloc_alloc_aligned_on_numa (clib_pmalloc_main_t * pm,
                                          uword size, uword align,
                                          u32 numa_node);