summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Evans <je@fb.com>2011-08-13 01:37:54 (GMT)
committerJason Evans <je@fb.com>2011-08-13 01:37:54 (GMT)
commit749c2a0ab62089891d8e40840fbf384f12cb8401 (patch)
tree267e612677faeb0477b795f44158091f97c80c67
parenta507004d294ad0c78b4d01559479620ebb272a49 (diff)
downloadjemalloc-749c2a0ab62089891d8e40840fbf384f12cb8401.zip
jemalloc-749c2a0ab62089891d8e40840fbf384f12cb8401.tar.gz
jemalloc-749c2a0ab62089891d8e40840fbf384f12cb8401.tar.bz2
Add missing prof_malloc() call in allocm().
Add a missing prof_malloc() call in allocm(). Before this fix, negative object/byte counts could be observed in heap profiles for applications that use allocm().
-rw-r--r--src/jemalloc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/jemalloc.c b/src/jemalloc.c
index 14a0c7c..b13b1bf 100644
--- a/src/jemalloc.c
+++ b/src/jemalloc.c
@@ -1587,8 +1587,7 @@ JEMALLOC_P(allocm)(void **ptr, size_t *rsize, size_t size, int flags)
if (malloc_init())
goto OOM;
- usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment,
- NULL);
+ usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment, NULL);
if (usize == 0)
goto OOM;
@@ -1612,7 +1611,7 @@ JEMALLOC_P(allocm)(void **ptr, size_t *rsize, size_t size, int flags)
if (p == NULL)
goto OOM;
}
-
+ prof_malloc(p, usize, cnt);
if (rsize != NULL)
*rsize = usize;
} else