malloc: allow reserving biggest element
authorAnatoly Burakov <anatoly.burakov@intel.com>
Thu, 31 May 2018 09:51:00 +0000 (10:51 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Fri, 13 Jul 2018 09:27:27 +0000 (11:27 +0200)
commit68b6092bd3c70e78fa30d8c3688adb4b66bf426e
treed50f27a0a3ca1a61c31f993d5004aec13a99b583
parent9fe6bceafd51042eca1c9ce0918f6d1d4483a41d
malloc: allow reserving biggest element

Add an internal-only function to allocate biggest element from
the heap. Nominally, it supports SOCKET_ID_ANY as its socket
argument, but it's essentially useless because other sockets
will only be allocated from if the entire heap on current or
specified socket is busy.

Still, asking to reserve a biggest element will allow fixing
race condition in memzone reserve that has been there for a
long time.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Remy Horton <remy.horton@intel.com>
lib/librte_eal/common/malloc_heap.c
lib/librte_eal/common/malloc_heap.h