mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-23 03:12:11 +03:00
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:
parent
a507004d29
commit
749c2a0ab6
1 changed files with 2 additions and 3 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue