diff --git a/third_party/musl/ndk_musl_include/malloc.h b/third_party/musl/ndk_musl_include/malloc.h index 3601b2625b7b4a62a346e1ff69358bced9a35d71..70cf26b70ff14e3f68062bbb5713cff418899d5b 100644 --- a/third_party/musl/ndk_musl_include/malloc.h +++ b/third_party/musl/ndk_musl_include/malloc.h @@ -104,6 +104,19 @@ struct mallinfo2 { size_t keepcost; }; +/** + * @brief Obtains the memory information allocated by malloc-related operations. + * @return A mallinfo struct containing details about memory allocation. + */ +struct mallinfo mallinfo(void); + +/** + * @brief Obtains the memory information allocated by malloc-related operations. + * @return A mallinfo2 struct containing details about memory allocation. Unlike mallinfo, this struct uses + * size_t for its counters, providing a larger range. + */ +struct mallinfo2 mallinfo2(void); + #ifdef __cplusplus } #endif diff --git a/third_party/musl/ndk_script/adapter/libc.ndk.json b/third_party/musl/ndk_script/adapter/libc.ndk.json index c1dfaf89df45277c7dad80084b0672b793e811bf..f9a52a2fd1d89ea1af4c48096b2131dff8643d22 100644 --- a/third_party/musl/ndk_script/adapter/libc.ndk.json +++ b/third_party/musl/ndk_script/adapter/libc.ndk.json @@ -757,6 +757,14 @@ { "name": "madvise" }, { "name": "malloc" }, { "name": "mallopt" }, + { + "first_introduced":"19", + "name": "mallinfo" + }, + { + "first_introduced":"19", + "name": "mallinfo2" + }, { "name": "malloc_usable_size" }, { "name": "mblen" }, { "name": "mbrlen" },