X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Fmalloc_heap.h;h=ca9ff666ffbdc4dae7946627576016012882dbef;hb=19f95c47448b3f0a6513a18325cb771f0b7b02b3;hp=03b8014157cb480a2a413fe380b84ec0473179b1;hpb=1403f87d4fb87ac908d818381ee3bd1a336f52d9;p=dpdk.git diff --git a/lib/librte_eal/common/malloc_heap.h b/lib/librte_eal/common/malloc_heap.h index 03b8014157..ca9ff666ff 100644 --- a/lib/librte_eal/common/malloc_heap.h +++ b/lib/librte_eal/common/malloc_heap.h @@ -29,6 +29,35 @@ void * malloc_heap_alloc(const char *type, size_t size, int socket, unsigned int flags, size_t align, size_t bound, bool contig); +void * +malloc_heap_alloc_biggest(const char *type, int socket, unsigned int flags, + size_t align, bool contig); + +int +malloc_heap_create(struct malloc_heap *heap, const char *heap_name); + +int +malloc_heap_destroy(struct malloc_heap *heap); + +struct rte_memseg_list * +malloc_heap_create_external_seg(void *va_addr, rte_iova_t iova_addrs[], + unsigned int n_pages, size_t page_sz, const char *seg_name, + unsigned int socket_id); + +struct rte_memseg_list * +malloc_heap_find_external_seg(void *va_addr, size_t len); + +int +malloc_heap_destroy_external_seg(struct rte_memseg_list *msl); + +int +malloc_heap_add_external_memory(struct malloc_heap *heap, + struct rte_memseg_list *msl); + +int +malloc_heap_remove_external_memory(struct malloc_heap *heap, void *va_addr, + size_t len); + int malloc_heap_free(struct malloc_elem *elem); @@ -42,6 +71,9 @@ malloc_heap_get_stats(struct malloc_heap *heap, void malloc_heap_dump(struct malloc_heap *heap, FILE *f); +int +malloc_socket_to_heap_id(unsigned int socket_id); + int rte_eal_malloc_heap_init(void);