X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;ds=sidebyside;f=lib%2Flibrte_eal%2Fcommon%2Fmalloc_elem.c;fp=lib%2Flibrte_eal%2Fcommon%2Fmalloc_elem.c;h=e2bd3ac21c0d1e254413b1358cc5b7be442d14e4;hb=5076209fa6f4affdf93f4d2f23f51a427f64f72b;hp=77a86151b2f39c1299e03439f065cc58596829cd;hpb=68f5e9d7d40c36c6ea398953af7e56519928ea78;p=deb_dpdk.git diff --git a/lib/librte_eal/common/malloc_elem.c b/lib/librte_eal/common/malloc_elem.c index 77a86151..e2bd3ac2 100644 --- a/lib/librte_eal/common/malloc_elem.c +++ b/lib/librte_eal/common/malloc_elem.c @@ -98,6 +98,7 @@ elem_start_pt(struct malloc_elem *elem, size_t size, unsigned align, if ((new_data_start & bmask) != ((end_pt - 1) & bmask)) { end_pt = RTE_ALIGN_FLOOR(end_pt, bound); new_data_start = RTE_ALIGN_FLOOR((end_pt - size), align); + end_pt = new_data_start + size; if (((end_pt - 1) & bmask) != (new_data_start & bmask)) return NULL; }