malloc: fix adjacency check to also include segment list
authorAnatoly Burakov <anatoly.burakov@intel.com>
Wed, 14 Nov 2018 15:00:58 +0000 (15:00 +0000)
committerThomas Monjalon <thomas@monjalon.net>
Sun, 18 Nov 2018 13:15:04 +0000 (14:15 +0100)
commit71aae4b421da9b741d1fb73a190a9facfec555b9
treefe1ac00f3e33c7b8d6639e97ee082b9658764e44
parent32fc0fa00eed43d6985c2e8d3691f0e29aeea645
malloc: fix adjacency check to also include segment list

It may so happen that two memory locations may be adjacent in
virtual memory, but belong to different segment lists. With
current code, such segments will be concatenated. Fix the
adjacency checking code to also check if the adjacent malloc
elements belong to the same memseg list.

Fixes: 66cc45e293ed ("mem: replace memseg with memseg lists")
Cc: stable@dpdk.org
Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
lib/librte_eal/common/malloc_elem.c