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().
This commit is contained in:
Jason Evans 2011-08-12 18:37:54 -07:00
parent a507004d29
commit 749c2a0ab6

View File

@ -1587,8 +1587,7 @@ JEMALLOC_P(allocm)(void **ptr, size_t *rsize, size_t size, int flags)
if (malloc_init()) if (malloc_init())
goto OOM; goto OOM;
usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment, usize = (alignment == 0) ? s2u(size) : sa2u(size, alignment, NULL);
NULL);
if (usize == 0) if (usize == 0)
goto OOM; goto OOM;
@ -1612,7 +1611,7 @@ JEMALLOC_P(allocm)(void **ptr, size_t *rsize, size_t size, int flags)
if (p == NULL) if (p == NULL)
goto OOM; goto OOM;
} }
prof_malloc(p, usize, cnt);
if (rsize != NULL) if (rsize != NULL)
*rsize = usize; *rsize = usize;
} else } else