X-Git-Url: http://git.droids-corp.org/?a=blobdiff_plain;f=lib%2Flibrte_eal%2Fcommon%2Fmalloc_elem.h;h=ce39129d9e3ff11031f04d9da20833ea530b42e9;hb=326223fea35c4fbadc081ef417e5d2b096541c69;hp=e05d2ea056dbe602354d1119316a78912a518410;hpb=fafcc11985a2d79c88334b10a6284068670954da;p=dpdk.git diff --git a/lib/librte_eal/common/malloc_elem.h b/lib/librte_eal/common/malloc_elem.h index e05d2ea056..ce39129d9e 100644 --- a/lib/librte_eal/common/malloc_elem.h +++ b/lib/librte_eal/common/malloc_elem.h @@ -53,13 +53,13 @@ struct malloc_elem { volatile enum elem_state state; uint32_t pad; size_t size; -#ifdef RTE_LIBRTE_MALLOC_DEBUG +#ifdef RTE_MALLOC_DEBUG uint64_t header_cookie; /* Cookie marking start of data */ /* trailer cookie at start + size */ #endif } __rte_cache_aligned; -#ifndef RTE_LIBRTE_MALLOC_DEBUG +#ifndef RTE_MALLOC_DEBUG static const unsigned MALLOC_ELEM_TRAILER_LEN = 0; /* dummy function - just check if pointer is non-null */ @@ -104,9 +104,9 @@ set_trailer(struct malloc_elem *elem) static inline int malloc_elem_cookies_ok(const struct malloc_elem *elem) { - return (elem != NULL && + return elem != NULL && MALLOC_ELEM_HEADER(elem) == MALLOC_HEADER_COOKIE && - MALLOC_ELEM_TRAILER(elem) == MALLOC_TRAILER_COOKIE); + MALLOC_ELEM_TRAILER(elem) == MALLOC_TRAILER_COOKIE; } #endif