mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-04-16 15:41:41 +03:00
Modify mallctl output length when needed
This is the only reason why `oldlenp` was designed to be in the form of a pointer.
This commit is contained in:
parent
4258402047
commit
f5fb4e5a97
2 changed files with 3 additions and 1 deletions
|
|
@ -1494,6 +1494,7 @@ ctl_mtx_assert_held(tsdn_t *tsdn) {
|
|||
size_t copylen = (sizeof(t) <= *oldlenp) \
|
||||
? sizeof(t) : *oldlenp; \
|
||||
memcpy(oldp, (void *)&(v), copylen); \
|
||||
*oldlenp = copylen; \
|
||||
ret = EINVAL; \
|
||||
goto label_return; \
|
||||
} \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue