[dpdk-users] Memory allocation in dpdk

Wiles, Keith keith.wiles at intel.com
Tue Oct 23 17:28:56 CEST 2018

> On Oct 23, 2018, at 1:44 AM, Avinash Chaurasia <avinash.aviank2003 at gmail.com> wrote:
> Hello,
> I am trying to understand how dpdk allocate memory. I tried digging code to
> understand memory allocation of DPDK. So far I understood that memory is
> allocated from a heap that dpdk maintains. However, this heap must be
> allocated at some place. I failed to traceback any function (called from
> heap_alloc()) that calls mmap to allocate memory. Please let me know when
> this heap is created, which function call does that.

Memory allocation is tricky in DPDK, but are you talking about rte_malloc or rte_mempool allocagtion. Each h has a different way to get memory. Look at the rte_memzone code it does the lowest level allocation of memory and use huge pages. Also look at the email list for patches submitted by Anatoly Burakov he just re-wrote the memory system and has some good explanations in the patches an in the docs for DPDK.

> Thanks
> Avinash Kumar Chaurasia


More information about the users mailing list