clarify malloc_info format is a bit different

pull/103/head 2
Daniel Micay 2019-08-20 15:57:59 -04:00
parent 2e4ab73fb6
commit 6d78dec42a
1 changed files with 3 additions and 2 deletions

View File

@ -782,8 +782,9 @@ enabled because glibc `mallinfo` is inherently broken. It defines the fields as
`int` instead of `size_t`, resulting in undefined signed overflows. It also `int` instead of `size_t`, resulting in undefined signed overflows. It also
misuses the fields and provides a strange, idiosyncratic set of values rather misuses the fields and provides a strange, idiosyncratic set of values rather
than following the SVID/XPG `mallinfo` definition. The `malloc_info` function than following the SVID/XPG `mallinfo` definition. The `malloc_info` function
is still provided, with the same format as Android but with the version set to is still provided, with a similar format as what Android uses, with tweaks for
`hardened_malloc-1`. The data format may be changed in the future. hardened\_malloc and the the version set to `hardened_malloc-1`. The data
format may be changed in the future.
As an example, consider the follow program from the hardened\_malloc tests: As an example, consider the follow program from the hardened\_malloc tests: