llvm-project/libc/include/stdlib-malloc.yaml
Roland McGrath ed48398431
[libc] Fill out generated malloc.h and related stdlib.h extensions (#127293)
This updates the generated stdlib.h and malloc.h headers to
include the subsets of extenion functions declared by glibc that
are also supported by Scudo and that use only simple types.
Scudo's extensions not declared by glibc are omitted.  glibc's
extensions not implemented by Scudo are omitted.  The mallinfo
and mallinfo2 functions are omitted (at least for now) since they
need struct definitions for their return types.
2025-02-15 16:32:30 -08:00

57 lines
1.2 KiB
YAML

# This file has declarations that appear both in <stdlib.h> and in <malloc.h>.
# These include the subset of GNU extensions that Scudo supports.
#
# Note: glibc's <stdlib.h> and <malloc.h> both also have `reallocarray`,
# which Scudo does not support and is omitted here. (Each of those glibc
# headers also has related functions the other lacks, but those should be
# covered separately in stdlib.yaml and malloc.yaml instead.)
functions:
- name: aligned_alloc
standards:
- stdc
return_type: void *
arguments:
- type: size_t
- type: size_t
- name: calloc
standards:
- stdc
return_type: void *
arguments:
- type: size_t
- type: size_t
- name: free
standards:
- stdc
return_type: void
arguments:
- type: void *
- name: malloc
standards:
- stdc
return_type: void *
arguments:
- type: size_t
- name: memalign
standards:
- gnu
return_type: void *
arguments:
- type: size_t
- type: size_t
- name: realloc
standards:
- stdc
return_type: void *
arguments:
- type: void *
- type: size_t
- name: valloc
standards:
- bsd
- gnu
return_type: void *
arguments:
- type: size_t