The objective of this library is to provide malloc-like functions to allow allocation from hugepage memory
and to facilitate application porting.
-The *IntelĀ® DPDK API Reference* manual describes the available functions.
+The *DPDK API Reference* manual describes the available functions.
Typically, these kinds of allocations should not be done in data plane processing
because they are slower than pool-based allocation and make use of locks within the allocation
and free paths.
However, they can be used in configuration code.
-Refer to the rte_malloc() function description in the *IntelĀ® DPDK API Reference* manual for more information.
+Refer to the rte_malloc() function description in the *DPDK API Reference* manual for more information.
Cookies
-------
since these are never touched except when they are to be freed again -
at which point the pointer to the block is an input to the free() function.
-.. _pg_figure_3:
+.. _figure_malloc_heap:
-**Figure 3. Example of a malloc heap and malloc elements within the malloc library**
+.. figure:: img/malloc_heap.*
-.. image4_png has been renamed
+ Example of a malloc heap and malloc elements within the malloc library
-|malloc_heap|
Structure: malloc_elem
^^^^^^^^^^^^^^^^^^^^^^
and on this occasion should find the newly created,
suitable element as the size of memory reserved in the memzone is set to be
at least the size of the requested data block plus the alignment -
-subject to a minimum size specified in the Intel DPDK compile-time configuration.
+subject to a minimum size specified in the DPDK compile-time configuration.
When a suitable, free element has been identified, the pointer to be returned to the user is calculated,
with the space to be provided to the user being at the end of the free block.
and if so, they are merged with the current elements.
This means that we can never have two free memory blocks adjacent to one another,
they are always merged into a single block.
-
-.. |malloc_heap| image:: img/malloc_heap.png