mirror of
https://github.com/clang-retro/llvm.git
synced 2026-11-28 13:19:18 -08:00
`mallinfo2` is the newer interface (available since glibc 2.33) that replaces legacy/deprecated `mallinfo`, and uses `struct mallinfo2` with properly sized struct fields. Scudo allocator implements this interface, and some of the code on Linux tests for / uses this functionality from `<malloc.h>` header, so let us define it as an external entrypoint in LLVM-libc as well. One of such users is LLVM itself, in `Process::GetMallocUsage()`. Assisted-by: automated tooling, human-reviewed.
42 lines
747 B
YAML
42 lines
747 B
YAML
header: malloc.h
|
|
standards:
|
|
- gnu
|
|
merge_yaml_files:
|
|
- stdlib-malloc.yaml
|
|
macros:
|
|
- macro_name: M_PURGE
|
|
macro_header: malloc-macros.h
|
|
- macro_name: M_PURGE_ALL
|
|
macro_header: malloc-macros.h
|
|
types:
|
|
- type_name: struct_mallinfo2
|
|
standards:
|
|
- gnu
|
|
functions:
|
|
- name: mallinfo2
|
|
standards:
|
|
- gnu
|
|
return_type: struct mallinfo2
|
|
arguments:
|
|
- type: void
|
|
- name: malloc_usable_size
|
|
standards:
|
|
- gnu
|
|
return_type: size_t
|
|
arguments:
|
|
- type: void *
|
|
- name: mallopt
|
|
standards:
|
|
- gnu
|
|
return_type: int
|
|
arguments:
|
|
- type: int
|
|
- type: int
|
|
- name: pvalloc
|
|
standards:
|
|
- bsd
|
|
- gnu
|
|
return_type: void *
|
|
arguments:
|
|
- type: size_t
|