diff options
author | 2019-04-09 12:38:40 +0800 | |
---|---|---|
committer | 2019-06-18 13:49:31 +0000 | |
commit | 03e099f935a5be25ce5d6833e5fba0ec75386573 (patch) | |
tree | 61899fcb07d99e0329c3e8ef523eb27ca08e3f6e /src | |
parent | 32a27b8f61cf7f8bf07b34911478814dcefe9d29 (diff) |
vppinfra: dlmalloc records wrong offset for tracing
Fix a bug that mheap_get_trace is called with the wrong pointer when
mspace_get_aligned allocates a chunk with alignment greater than 16
but less than 4k.
Type: fix
Change-Id: Ic3b91fc9532248482662f019bbfa073da18645ed
Signed-off-by: Wei CHEN <weichen@astri.org>
(cherry picked from commit 5e282e93ad9f961d332cac9a033be33542979848)
Diffstat (limited to 'src')
-rw-r--r-- | src/vppinfra/dlmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/vppinfra/dlmalloc.c b/src/vppinfra/dlmalloc.c index 37721bb15fd..2a40eeb7f5b 100644 --- a/src/vppinfra/dlmalloc.c +++ b/src/vppinfra/dlmalloc.c @@ -4259,7 +4259,7 @@ void* mspace_get_aligned (mspace msp, if (use_trace(ms)) { mchunkptr p = mem2chunk(rv); size_t psize = chunksize(p); - mheap_get_trace ((unsigned long)rv, psize); + mheap_get_trace (searchp, psize); } return (void *) searchp; } |