malloc: fix heap size not set on init
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 25 Apr 2018 13:42:55 +0000 (14:42 +0100)
committerThomas Monjalon <thomas@monjalon.net>
Mon, 30 Apr 2018 13:33:49 +0000 (15:33 +0200)
commit3eb9af341604fcdfd1cb14d6a7957e0aa88fff02
tree968ccc4675318ea03d07cb461e01962552958bd9
parenteb8d29f825007605ace0d609233f68915ab2b79e
malloc: fix heap size not set on init

When heap initializes, we need to add already allocated segments
onto the heap. However, in doing that, we never increased total
heap size. Fix it by adding segment length to total heap length
when initializing the heap.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/malloc_heap.c