diff options
Diffstat (limited to 'gl/malloc')
-rw-r--r-- | gl/malloc/.deps/.dirstamp | 0 | ||||
-rw-r--r-- | gl/malloc/.deps/libgnu_a-dynarray-skeleton.Po | 1 | ||||
-rw-r--r-- | gl/malloc/.deps/libgnu_a-dynarray_at_failure.Po | 142 | ||||
-rw-r--r-- | gl/malloc/.deps/libgnu_a-dynarray_emplace_enlarge.Po | 142 | ||||
-rw-r--r-- | gl/malloc/.deps/libgnu_a-dynarray_finalize.Po | 119 | ||||
-rw-r--r-- | gl/malloc/.deps/libgnu_a-dynarray_resize.Po | 141 | ||||
-rw-r--r-- | gl/malloc/.deps/libgnu_a-dynarray_resize_clear.Po | 52 | ||||
-rw-r--r-- | gl/malloc/.dirstamp | 0 | ||||
-rw-r--r-- | gl/malloc/dynarray-skeleton.gl.h | 529 | ||||
-rw-r--r-- | gl/malloc/dynarray.gl.h | 173 |
10 files changed, 1299 insertions, 0 deletions
diff --git a/gl/malloc/.deps/.dirstamp b/gl/malloc/.deps/.dirstamp new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/gl/malloc/.deps/.dirstamp | |||
diff --git a/gl/malloc/.deps/libgnu_a-dynarray-skeleton.Po b/gl/malloc/.deps/libgnu_a-dynarray-skeleton.Po new file mode 100644 index 00000000..9ce06a81 --- /dev/null +++ b/gl/malloc/.deps/libgnu_a-dynarray-skeleton.Po | |||
@@ -0,0 +1 @@ | |||
# dummy | |||
diff --git a/gl/malloc/.deps/libgnu_a-dynarray_at_failure.Po b/gl/malloc/.deps/libgnu_a-dynarray_at_failure.Po new file mode 100644 index 00000000..4902a8d3 --- /dev/null +++ b/gl/malloc/.deps/libgnu_a-dynarray_at_failure.Po | |||
@@ -0,0 +1,142 @@ | |||
1 | malloc/libgnu_a-dynarray_at_failure.o: malloc/dynarray_at_failure.c \ | ||
2 | /usr/include/stdc-predef.h libc-config.h ../config.h \ | ||
3 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h \ | ||
4 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h /usr/include/assert.h \ | ||
5 | /usr/include/features.h /usr/include/features-time64.h \ | ||
6 | /usr/include/x86_64-linux-gnu/bits/wordsize.h \ | ||
7 | /usr/include/x86_64-linux-gnu/bits/timesize.h \ | ||
8 | /usr/include/x86_64-linux-gnu/sys/cdefs.h \ | ||
9 | /usr/include/x86_64-linux-gnu/bits/long-double.h \ | ||
10 | /usr/include/x86_64-linux-gnu/gnu/stubs.h \ | ||
11 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/errno.h \ | ||
12 | /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ | ||
13 | /usr/include/x86_64-linux-gnu/asm/errno.h \ | ||
14 | /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ | ||
15 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h stdlib.h \ | ||
16 | /usr/include/stdlib.h \ | ||
17 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ | ||
18 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ | ||
19 | /usr/include/x86_64-linux-gnu/bits/waitflags.h \ | ||
20 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ | ||
21 | /usr/include/x86_64-linux-gnu/bits/floatn.h \ | ||
22 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h \ | ||
23 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ | ||
24 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h sys/types.h \ | ||
25 | /usr/include/x86_64-linux-gnu/sys/types.h \ | ||
26 | /usr/include/x86_64-linux-gnu/bits/types.h \ | ||
27 | /usr/include/x86_64-linux-gnu/bits/typesizes.h \ | ||
28 | /usr/include/x86_64-linux-gnu/bits/time64.h \ | ||
29 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ | ||
30 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ | ||
31 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ | ||
32 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ | ||
33 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ | ||
34 | /usr/include/x86_64-linux-gnu/bits/endian.h \ | ||
35 | /usr/include/x86_64-linux-gnu/bits/endianness.h \ | ||
36 | /usr/include/x86_64-linux-gnu/bits/byteswap.h \ | ||
37 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ | ||
38 | /usr/include/x86_64-linux-gnu/sys/select.h \ | ||
39 | /usr/include/x86_64-linux-gnu/bits/select.h \ | ||
40 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ | ||
41 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ | ||
42 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ | ||
43 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ | ||
44 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ | ||
45 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ | ||
46 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ | ||
47 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ | ||
48 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ | ||
49 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h alloca.h \ | ||
50 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ | ||
51 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h dynarray.h \ | ||
52 | malloc/dynarray.h string.h /usr/include/string.h strings.h \ | ||
53 | /usr/include/strings.h stdio.h /usr/include/stdio.h \ | ||
54 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdarg.h \ | ||
55 | /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h \ | ||
56 | /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h \ | ||
57 | /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h \ | ||
58 | /usr/include/x86_64-linux-gnu/bits/types/__FILE.h \ | ||
59 | /usr/include/x86_64-linux-gnu/bits/types/FILE.h \ | ||
60 | /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h \ | ||
61 | /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h \ | ||
62 | /usr/include/x86_64-linux-gnu/bits/stdio_lim.h \ | ||
63 | /usr/include/x86_64-linux-gnu/bits/stdio.h | ||
64 | /usr/include/stdc-predef.h: | ||
65 | libc-config.h: | ||
66 | ../config.h: | ||
67 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h: | ||
68 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h: | ||
69 | /usr/include/assert.h: | ||
70 | /usr/include/features.h: | ||
71 | /usr/include/features-time64.h: | ||
72 | /usr/include/x86_64-linux-gnu/bits/wordsize.h: | ||
73 | /usr/include/x86_64-linux-gnu/bits/timesize.h: | ||
74 | /usr/include/x86_64-linux-gnu/sys/cdefs.h: | ||
75 | /usr/include/x86_64-linux-gnu/bits/long-double.h: | ||
76 | /usr/include/x86_64-linux-gnu/gnu/stubs.h: | ||
77 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h: | ||
78 | /usr/include/errno.h: | ||
79 | /usr/include/x86_64-linux-gnu/bits/errno.h: | ||
80 | /usr/include/linux/errno.h: | ||
81 | /usr/include/x86_64-linux-gnu/asm/errno.h: | ||
82 | /usr/include/asm-generic/errno.h: | ||
83 | /usr/include/asm-generic/errno-base.h: | ||
84 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h: | ||
85 | stdlib.h: | ||
86 | /usr/include/stdlib.h: | ||
87 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h: | ||
88 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: | ||
89 | /usr/include/x86_64-linux-gnu/bits/waitflags.h: | ||
90 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h: | ||
91 | /usr/include/x86_64-linux-gnu/bits/floatn.h: | ||
92 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h: | ||
93 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h: | ||
94 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: | ||
95 | sys/types.h: | ||
96 | /usr/include/x86_64-linux-gnu/sys/types.h: | ||
97 | /usr/include/x86_64-linux-gnu/bits/types.h: | ||
98 | /usr/include/x86_64-linux-gnu/bits/typesizes.h: | ||
99 | /usr/include/x86_64-linux-gnu/bits/time64.h: | ||
100 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h: | ||
101 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: | ||
102 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h: | ||
103 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h: | ||
104 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h: | ||
105 | /usr/include/endian.h: | ||
106 | /usr/include/x86_64-linux-gnu/bits/endian.h: | ||
107 | /usr/include/x86_64-linux-gnu/bits/endianness.h: | ||
108 | /usr/include/x86_64-linux-gnu/bits/byteswap.h: | ||
109 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h: | ||
110 | /usr/include/x86_64-linux-gnu/sys/select.h: | ||
111 | /usr/include/x86_64-linux-gnu/bits/select.h: | ||
112 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: | ||
113 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: | ||
114 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: | ||
115 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: | ||
116 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: | ||
117 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: | ||
118 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: | ||
119 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h: | ||
120 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h: | ||
121 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: | ||
122 | alloca.h: | ||
123 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: | ||
124 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: | ||
125 | dynarray.h: | ||
126 | malloc/dynarray.h: | ||
127 | string.h: | ||
128 | /usr/include/string.h: | ||
129 | strings.h: | ||
130 | /usr/include/strings.h: | ||
131 | stdio.h: | ||
132 | /usr/include/stdio.h: | ||
133 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdarg.h: | ||
134 | /usr/include/x86_64-linux-gnu/bits/types/__fpos_t.h: | ||
135 | /usr/include/x86_64-linux-gnu/bits/types/__mbstate_t.h: | ||
136 | /usr/include/x86_64-linux-gnu/bits/types/__fpos64_t.h: | ||
137 | /usr/include/x86_64-linux-gnu/bits/types/__FILE.h: | ||
138 | /usr/include/x86_64-linux-gnu/bits/types/FILE.h: | ||
139 | /usr/include/x86_64-linux-gnu/bits/types/struct_FILE.h: | ||
140 | /usr/include/x86_64-linux-gnu/bits/types/cookie_io_functions_t.h: | ||
141 | /usr/include/x86_64-linux-gnu/bits/stdio_lim.h: | ||
142 | /usr/include/x86_64-linux-gnu/bits/stdio.h: | ||
diff --git a/gl/malloc/.deps/libgnu_a-dynarray_emplace_enlarge.Po b/gl/malloc/.deps/libgnu_a-dynarray_emplace_enlarge.Po new file mode 100644 index 00000000..be7a9ebb --- /dev/null +++ b/gl/malloc/.deps/libgnu_a-dynarray_emplace_enlarge.Po | |||
@@ -0,0 +1,142 @@ | |||
1 | malloc/libgnu_a-dynarray_emplace_enlarge.o: \ | ||
2 | malloc/dynarray_emplace_enlarge.c /usr/include/stdc-predef.h \ | ||
3 | libc-config.h ../config.h \ | ||
4 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h \ | ||
5 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h /usr/include/assert.h \ | ||
6 | /usr/include/features.h /usr/include/features-time64.h \ | ||
7 | /usr/include/x86_64-linux-gnu/bits/wordsize.h \ | ||
8 | /usr/include/x86_64-linux-gnu/bits/timesize.h \ | ||
9 | /usr/include/x86_64-linux-gnu/sys/cdefs.h \ | ||
10 | /usr/include/x86_64-linux-gnu/bits/long-double.h \ | ||
11 | /usr/include/x86_64-linux-gnu/gnu/stubs.h \ | ||
12 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/errno.h \ | ||
13 | /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ | ||
14 | /usr/include/x86_64-linux-gnu/asm/errno.h \ | ||
15 | /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ | ||
16 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h dynarray.h \ | ||
17 | malloc/dynarray.h /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ | ||
18 | string.h /usr/include/string.h \ | ||
19 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ | ||
20 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ | ||
21 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h strings.h \ | ||
22 | /usr/include/strings.h intprops.h intprops-internal.h limits.h \ | ||
23 | /usr/lib/gcc/x86_64-linux-gnu/12/include/limits.h \ | ||
24 | /usr/lib/gcc/x86_64-linux-gnu/12/include/syslimits.h \ | ||
25 | /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ | ||
26 | /usr/include/x86_64-linux-gnu/bits/local_lim.h \ | ||
27 | /usr/include/linux/limits.h \ | ||
28 | /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ | ||
29 | /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \ | ||
30 | /usr/include/x86_64-linux-gnu/bits/xopen_lim.h \ | ||
31 | /usr/include/x86_64-linux-gnu/bits/uio_lim.h stdlib.h \ | ||
32 | /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ | ||
33 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ | ||
34 | /usr/include/x86_64-linux-gnu/bits/floatn.h \ | ||
35 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h sys/types.h \ | ||
36 | /usr/include/x86_64-linux-gnu/sys/types.h \ | ||
37 | /usr/include/x86_64-linux-gnu/bits/types.h \ | ||
38 | /usr/include/x86_64-linux-gnu/bits/typesizes.h \ | ||
39 | /usr/include/x86_64-linux-gnu/bits/time64.h \ | ||
40 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ | ||
41 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ | ||
42 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ | ||
43 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ | ||
44 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ | ||
45 | /usr/include/x86_64-linux-gnu/bits/endian.h \ | ||
46 | /usr/include/x86_64-linux-gnu/bits/endianness.h \ | ||
47 | /usr/include/x86_64-linux-gnu/bits/byteswap.h \ | ||
48 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ | ||
49 | /usr/include/x86_64-linux-gnu/sys/select.h \ | ||
50 | /usr/include/x86_64-linux-gnu/bits/select.h \ | ||
51 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ | ||
52 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ | ||
53 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ | ||
54 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ | ||
55 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ | ||
56 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ | ||
57 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ | ||
58 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ | ||
59 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ | ||
60 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h alloca.h \ | ||
61 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ | ||
62 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h | ||
63 | /usr/include/stdc-predef.h: | ||
64 | libc-config.h: | ||
65 | ../config.h: | ||
66 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h: | ||
67 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h: | ||
68 | /usr/include/assert.h: | ||
69 | /usr/include/features.h: | ||
70 | /usr/include/features-time64.h: | ||
71 | /usr/include/x86_64-linux-gnu/bits/wordsize.h: | ||
72 | /usr/include/x86_64-linux-gnu/bits/timesize.h: | ||
73 | /usr/include/x86_64-linux-gnu/sys/cdefs.h: | ||
74 | /usr/include/x86_64-linux-gnu/bits/long-double.h: | ||
75 | /usr/include/x86_64-linux-gnu/gnu/stubs.h: | ||
76 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h: | ||
77 | /usr/include/errno.h: | ||
78 | /usr/include/x86_64-linux-gnu/bits/errno.h: | ||
79 | /usr/include/linux/errno.h: | ||
80 | /usr/include/x86_64-linux-gnu/asm/errno.h: | ||
81 | /usr/include/asm-generic/errno.h: | ||
82 | /usr/include/asm-generic/errno-base.h: | ||
83 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h: | ||
84 | dynarray.h: | ||
85 | malloc/dynarray.h: | ||
86 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: | ||
87 | string.h: | ||
88 | /usr/include/string.h: | ||
89 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h: | ||
90 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h: | ||
91 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: | ||
92 | strings.h: | ||
93 | /usr/include/strings.h: | ||
94 | intprops.h: | ||
95 | intprops-internal.h: | ||
96 | limits.h: | ||
97 | /usr/lib/gcc/x86_64-linux-gnu/12/include/limits.h: | ||
98 | /usr/lib/gcc/x86_64-linux-gnu/12/include/syslimits.h: | ||
99 | /usr/include/limits.h: | ||
100 | /usr/include/x86_64-linux-gnu/bits/posix1_lim.h: | ||
101 | /usr/include/x86_64-linux-gnu/bits/local_lim.h: | ||
102 | /usr/include/linux/limits.h: | ||
103 | /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h: | ||
104 | /usr/include/x86_64-linux-gnu/bits/posix2_lim.h: | ||
105 | /usr/include/x86_64-linux-gnu/bits/xopen_lim.h: | ||
106 | /usr/include/x86_64-linux-gnu/bits/uio_lim.h: | ||
107 | stdlib.h: | ||
108 | /usr/include/stdlib.h: | ||
109 | /usr/include/x86_64-linux-gnu/bits/waitflags.h: | ||
110 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h: | ||
111 | /usr/include/x86_64-linux-gnu/bits/floatn.h: | ||
112 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h: | ||
113 | sys/types.h: | ||
114 | /usr/include/x86_64-linux-gnu/sys/types.h: | ||
115 | /usr/include/x86_64-linux-gnu/bits/types.h: | ||
116 | /usr/include/x86_64-linux-gnu/bits/typesizes.h: | ||
117 | /usr/include/x86_64-linux-gnu/bits/time64.h: | ||
118 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h: | ||
119 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: | ||
120 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h: | ||
121 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h: | ||
122 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h: | ||
123 | /usr/include/endian.h: | ||
124 | /usr/include/x86_64-linux-gnu/bits/endian.h: | ||
125 | /usr/include/x86_64-linux-gnu/bits/endianness.h: | ||
126 | /usr/include/x86_64-linux-gnu/bits/byteswap.h: | ||
127 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h: | ||
128 | /usr/include/x86_64-linux-gnu/sys/select.h: | ||
129 | /usr/include/x86_64-linux-gnu/bits/select.h: | ||
130 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: | ||
131 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: | ||
132 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: | ||
133 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: | ||
134 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: | ||
135 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: | ||
136 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: | ||
137 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h: | ||
138 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h: | ||
139 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: | ||
140 | alloca.h: | ||
141 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: | ||
142 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: | ||
diff --git a/gl/malloc/.deps/libgnu_a-dynarray_finalize.Po b/gl/malloc/.deps/libgnu_a-dynarray_finalize.Po new file mode 100644 index 00000000..0c9dc348 --- /dev/null +++ b/gl/malloc/.deps/libgnu_a-dynarray_finalize.Po | |||
@@ -0,0 +1,119 @@ | |||
1 | malloc/libgnu_a-dynarray_finalize.o: malloc/dynarray_finalize.c \ | ||
2 | /usr/include/stdc-predef.h libc-config.h ../config.h \ | ||
3 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h \ | ||
4 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h /usr/include/assert.h \ | ||
5 | /usr/include/features.h /usr/include/features-time64.h \ | ||
6 | /usr/include/x86_64-linux-gnu/bits/wordsize.h \ | ||
7 | /usr/include/x86_64-linux-gnu/bits/timesize.h \ | ||
8 | /usr/include/x86_64-linux-gnu/sys/cdefs.h \ | ||
9 | /usr/include/x86_64-linux-gnu/bits/long-double.h \ | ||
10 | /usr/include/x86_64-linux-gnu/gnu/stubs.h \ | ||
11 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/errno.h \ | ||
12 | /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ | ||
13 | /usr/include/x86_64-linux-gnu/asm/errno.h \ | ||
14 | /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ | ||
15 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h dynarray.h \ | ||
16 | malloc/dynarray.h /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ | ||
17 | string.h /usr/include/string.h \ | ||
18 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ | ||
19 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ | ||
20 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h strings.h \ | ||
21 | /usr/include/strings.h stdlib.h /usr/include/stdlib.h \ | ||
22 | /usr/include/x86_64-linux-gnu/bits/waitflags.h \ | ||
23 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ | ||
24 | /usr/include/x86_64-linux-gnu/bits/floatn.h \ | ||
25 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h sys/types.h \ | ||
26 | /usr/include/x86_64-linux-gnu/sys/types.h \ | ||
27 | /usr/include/x86_64-linux-gnu/bits/types.h \ | ||
28 | /usr/include/x86_64-linux-gnu/bits/typesizes.h \ | ||
29 | /usr/include/x86_64-linux-gnu/bits/time64.h \ | ||
30 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ | ||
31 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ | ||
32 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ | ||
33 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ | ||
34 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ | ||
35 | /usr/include/x86_64-linux-gnu/bits/endian.h \ | ||
36 | /usr/include/x86_64-linux-gnu/bits/endianness.h \ | ||
37 | /usr/include/x86_64-linux-gnu/bits/byteswap.h \ | ||
38 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ | ||
39 | /usr/include/x86_64-linux-gnu/sys/select.h \ | ||
40 | /usr/include/x86_64-linux-gnu/bits/select.h \ | ||
41 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ | ||
42 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ | ||
43 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ | ||
44 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ | ||
45 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ | ||
46 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ | ||
47 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ | ||
48 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ | ||
49 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ | ||
50 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h alloca.h \ | ||
51 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ | ||
52 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h | ||
53 | /usr/include/stdc-predef.h: | ||
54 | libc-config.h: | ||
55 | ../config.h: | ||
56 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h: | ||
57 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h: | ||
58 | /usr/include/assert.h: | ||
59 | /usr/include/features.h: | ||
60 | /usr/include/features-time64.h: | ||
61 | /usr/include/x86_64-linux-gnu/bits/wordsize.h: | ||
62 | /usr/include/x86_64-linux-gnu/bits/timesize.h: | ||
63 | /usr/include/x86_64-linux-gnu/sys/cdefs.h: | ||
64 | /usr/include/x86_64-linux-gnu/bits/long-double.h: | ||
65 | /usr/include/x86_64-linux-gnu/gnu/stubs.h: | ||
66 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h: | ||
67 | /usr/include/errno.h: | ||
68 | /usr/include/x86_64-linux-gnu/bits/errno.h: | ||
69 | /usr/include/linux/errno.h: | ||
70 | /usr/include/x86_64-linux-gnu/asm/errno.h: | ||
71 | /usr/include/asm-generic/errno.h: | ||
72 | /usr/include/asm-generic/errno-base.h: | ||
73 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h: | ||
74 | dynarray.h: | ||
75 | malloc/dynarray.h: | ||
76 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: | ||
77 | string.h: | ||
78 | /usr/include/string.h: | ||
79 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h: | ||
80 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h: | ||
81 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: | ||
82 | strings.h: | ||
83 | /usr/include/strings.h: | ||
84 | stdlib.h: | ||
85 | /usr/include/stdlib.h: | ||
86 | /usr/include/x86_64-linux-gnu/bits/waitflags.h: | ||
87 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h: | ||
88 | /usr/include/x86_64-linux-gnu/bits/floatn.h: | ||
89 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h: | ||
90 | sys/types.h: | ||
91 | /usr/include/x86_64-linux-gnu/sys/types.h: | ||
92 | /usr/include/x86_64-linux-gnu/bits/types.h: | ||
93 | /usr/include/x86_64-linux-gnu/bits/typesizes.h: | ||
94 | /usr/include/x86_64-linux-gnu/bits/time64.h: | ||
95 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h: | ||
96 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: | ||
97 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h: | ||
98 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h: | ||
99 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h: | ||
100 | /usr/include/endian.h: | ||
101 | /usr/include/x86_64-linux-gnu/bits/endian.h: | ||
102 | /usr/include/x86_64-linux-gnu/bits/endianness.h: | ||
103 | /usr/include/x86_64-linux-gnu/bits/byteswap.h: | ||
104 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h: | ||
105 | /usr/include/x86_64-linux-gnu/sys/select.h: | ||
106 | /usr/include/x86_64-linux-gnu/bits/select.h: | ||
107 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: | ||
108 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: | ||
109 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: | ||
110 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: | ||
111 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: | ||
112 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: | ||
113 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: | ||
114 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h: | ||
115 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h: | ||
116 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: | ||
117 | alloca.h: | ||
118 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: | ||
119 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: | ||
diff --git a/gl/malloc/.deps/libgnu_a-dynarray_resize.Po b/gl/malloc/.deps/libgnu_a-dynarray_resize.Po new file mode 100644 index 00000000..e738d851 --- /dev/null +++ b/gl/malloc/.deps/libgnu_a-dynarray_resize.Po | |||
@@ -0,0 +1,141 @@ | |||
1 | malloc/libgnu_a-dynarray_resize.o: malloc/dynarray_resize.c \ | ||
2 | /usr/include/stdc-predef.h libc-config.h ../config.h \ | ||
3 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h \ | ||
4 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h /usr/include/assert.h \ | ||
5 | /usr/include/features.h /usr/include/features-time64.h \ | ||
6 | /usr/include/x86_64-linux-gnu/bits/wordsize.h \ | ||
7 | /usr/include/x86_64-linux-gnu/bits/timesize.h \ | ||
8 | /usr/include/x86_64-linux-gnu/sys/cdefs.h \ | ||
9 | /usr/include/x86_64-linux-gnu/bits/long-double.h \ | ||
10 | /usr/include/x86_64-linux-gnu/gnu/stubs.h \ | ||
11 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/errno.h \ | ||
12 | /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ | ||
13 | /usr/include/x86_64-linux-gnu/asm/errno.h \ | ||
14 | /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ | ||
15 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h dynarray.h \ | ||
16 | malloc/dynarray.h /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ | ||
17 | string.h /usr/include/string.h \ | ||
18 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ | ||
19 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ | ||
20 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h strings.h \ | ||
21 | /usr/include/strings.h intprops.h intprops-internal.h limits.h \ | ||
22 | /usr/lib/gcc/x86_64-linux-gnu/12/include/limits.h \ | ||
23 | /usr/lib/gcc/x86_64-linux-gnu/12/include/syslimits.h \ | ||
24 | /usr/include/limits.h /usr/include/x86_64-linux-gnu/bits/posix1_lim.h \ | ||
25 | /usr/include/x86_64-linux-gnu/bits/local_lim.h \ | ||
26 | /usr/include/linux/limits.h \ | ||
27 | /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h \ | ||
28 | /usr/include/x86_64-linux-gnu/bits/posix2_lim.h \ | ||
29 | /usr/include/x86_64-linux-gnu/bits/xopen_lim.h \ | ||
30 | /usr/include/x86_64-linux-gnu/bits/uio_lim.h stdlib.h \ | ||
31 | /usr/include/stdlib.h /usr/include/x86_64-linux-gnu/bits/waitflags.h \ | ||
32 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h \ | ||
33 | /usr/include/x86_64-linux-gnu/bits/floatn.h \ | ||
34 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h sys/types.h \ | ||
35 | /usr/include/x86_64-linux-gnu/sys/types.h \ | ||
36 | /usr/include/x86_64-linux-gnu/bits/types.h \ | ||
37 | /usr/include/x86_64-linux-gnu/bits/typesizes.h \ | ||
38 | /usr/include/x86_64-linux-gnu/bits/time64.h \ | ||
39 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h \ | ||
40 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h \ | ||
41 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h \ | ||
42 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h \ | ||
43 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h /usr/include/endian.h \ | ||
44 | /usr/include/x86_64-linux-gnu/bits/endian.h \ | ||
45 | /usr/include/x86_64-linux-gnu/bits/endianness.h \ | ||
46 | /usr/include/x86_64-linux-gnu/bits/byteswap.h \ | ||
47 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h \ | ||
48 | /usr/include/x86_64-linux-gnu/sys/select.h \ | ||
49 | /usr/include/x86_64-linux-gnu/bits/select.h \ | ||
50 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h \ | ||
51 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h \ | ||
52 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h \ | ||
53 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h \ | ||
54 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h \ | ||
55 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h \ | ||
56 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h \ | ||
57 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h \ | ||
58 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h \ | ||
59 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h alloca.h \ | ||
60 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h \ | ||
61 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h | ||
62 | /usr/include/stdc-predef.h: | ||
63 | libc-config.h: | ||
64 | ../config.h: | ||
65 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h: | ||
66 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h: | ||
67 | /usr/include/assert.h: | ||
68 | /usr/include/features.h: | ||
69 | /usr/include/features-time64.h: | ||
70 | /usr/include/x86_64-linux-gnu/bits/wordsize.h: | ||
71 | /usr/include/x86_64-linux-gnu/bits/timesize.h: | ||
72 | /usr/include/x86_64-linux-gnu/sys/cdefs.h: | ||
73 | /usr/include/x86_64-linux-gnu/bits/long-double.h: | ||
74 | /usr/include/x86_64-linux-gnu/gnu/stubs.h: | ||
75 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h: | ||
76 | /usr/include/errno.h: | ||
77 | /usr/include/x86_64-linux-gnu/bits/errno.h: | ||
78 | /usr/include/linux/errno.h: | ||
79 | /usr/include/x86_64-linux-gnu/asm/errno.h: | ||
80 | /usr/include/asm-generic/errno.h: | ||
81 | /usr/include/asm-generic/errno-base.h: | ||
82 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h: | ||
83 | dynarray.h: | ||
84 | malloc/dynarray.h: | ||
85 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: | ||
86 | string.h: | ||
87 | /usr/include/string.h: | ||
88 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h: | ||
89 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h: | ||
90 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: | ||
91 | strings.h: | ||
92 | /usr/include/strings.h: | ||
93 | intprops.h: | ||
94 | intprops-internal.h: | ||
95 | limits.h: | ||
96 | /usr/lib/gcc/x86_64-linux-gnu/12/include/limits.h: | ||
97 | /usr/lib/gcc/x86_64-linux-gnu/12/include/syslimits.h: | ||
98 | /usr/include/limits.h: | ||
99 | /usr/include/x86_64-linux-gnu/bits/posix1_lim.h: | ||
100 | /usr/include/x86_64-linux-gnu/bits/local_lim.h: | ||
101 | /usr/include/linux/limits.h: | ||
102 | /usr/include/x86_64-linux-gnu/bits/pthread_stack_min-dynamic.h: | ||
103 | /usr/include/x86_64-linux-gnu/bits/posix2_lim.h: | ||
104 | /usr/include/x86_64-linux-gnu/bits/xopen_lim.h: | ||
105 | /usr/include/x86_64-linux-gnu/bits/uio_lim.h: | ||
106 | stdlib.h: | ||
107 | /usr/include/stdlib.h: | ||
108 | /usr/include/x86_64-linux-gnu/bits/waitflags.h: | ||
109 | /usr/include/x86_64-linux-gnu/bits/waitstatus.h: | ||
110 | /usr/include/x86_64-linux-gnu/bits/floatn.h: | ||
111 | /usr/include/x86_64-linux-gnu/bits/floatn-common.h: | ||
112 | sys/types.h: | ||
113 | /usr/include/x86_64-linux-gnu/sys/types.h: | ||
114 | /usr/include/x86_64-linux-gnu/bits/types.h: | ||
115 | /usr/include/x86_64-linux-gnu/bits/typesizes.h: | ||
116 | /usr/include/x86_64-linux-gnu/bits/time64.h: | ||
117 | /usr/include/x86_64-linux-gnu/bits/types/clock_t.h: | ||
118 | /usr/include/x86_64-linux-gnu/bits/types/clockid_t.h: | ||
119 | /usr/include/x86_64-linux-gnu/bits/types/time_t.h: | ||
120 | /usr/include/x86_64-linux-gnu/bits/types/timer_t.h: | ||
121 | /usr/include/x86_64-linux-gnu/bits/stdint-intn.h: | ||
122 | /usr/include/endian.h: | ||
123 | /usr/include/x86_64-linux-gnu/bits/endian.h: | ||
124 | /usr/include/x86_64-linux-gnu/bits/endianness.h: | ||
125 | /usr/include/x86_64-linux-gnu/bits/byteswap.h: | ||
126 | /usr/include/x86_64-linux-gnu/bits/uintn-identity.h: | ||
127 | /usr/include/x86_64-linux-gnu/sys/select.h: | ||
128 | /usr/include/x86_64-linux-gnu/bits/select.h: | ||
129 | /usr/include/x86_64-linux-gnu/bits/types/sigset_t.h: | ||
130 | /usr/include/x86_64-linux-gnu/bits/types/__sigset_t.h: | ||
131 | /usr/include/x86_64-linux-gnu/bits/types/struct_timeval.h: | ||
132 | /usr/include/x86_64-linux-gnu/bits/types/struct_timespec.h: | ||
133 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes.h: | ||
134 | /usr/include/x86_64-linux-gnu/bits/thread-shared-types.h: | ||
135 | /usr/include/x86_64-linux-gnu/bits/pthreadtypes-arch.h: | ||
136 | /usr/include/x86_64-linux-gnu/bits/atomic_wide_counter.h: | ||
137 | /usr/include/x86_64-linux-gnu/bits/struct_mutex.h: | ||
138 | /usr/include/x86_64-linux-gnu/bits/struct_rwlock.h: | ||
139 | alloca.h: | ||
140 | /usr/include/x86_64-linux-gnu/bits/stdlib-bsearch.h: | ||
141 | /usr/include/x86_64-linux-gnu/bits/stdlib-float.h: | ||
diff --git a/gl/malloc/.deps/libgnu_a-dynarray_resize_clear.Po b/gl/malloc/.deps/libgnu_a-dynarray_resize_clear.Po new file mode 100644 index 00000000..9585a048 --- /dev/null +++ b/gl/malloc/.deps/libgnu_a-dynarray_resize_clear.Po | |||
@@ -0,0 +1,52 @@ | |||
1 | malloc/libgnu_a-dynarray_resize_clear.o: malloc/dynarray_resize_clear.c \ | ||
2 | /usr/include/stdc-predef.h libc-config.h ../config.h \ | ||
3 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h \ | ||
4 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h /usr/include/assert.h \ | ||
5 | /usr/include/features.h /usr/include/features-time64.h \ | ||
6 | /usr/include/x86_64-linux-gnu/bits/wordsize.h \ | ||
7 | /usr/include/x86_64-linux-gnu/bits/timesize.h \ | ||
8 | /usr/include/x86_64-linux-gnu/sys/cdefs.h \ | ||
9 | /usr/include/x86_64-linux-gnu/bits/long-double.h \ | ||
10 | /usr/include/x86_64-linux-gnu/gnu/stubs.h \ | ||
11 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h /usr/include/errno.h \ | ||
12 | /usr/include/x86_64-linux-gnu/bits/errno.h /usr/include/linux/errno.h \ | ||
13 | /usr/include/x86_64-linux-gnu/asm/errno.h \ | ||
14 | /usr/include/asm-generic/errno.h /usr/include/asm-generic/errno-base.h \ | ||
15 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h dynarray.h \ | ||
16 | malloc/dynarray.h /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h \ | ||
17 | string.h /usr/include/string.h \ | ||
18 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h \ | ||
19 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h \ | ||
20 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h strings.h \ | ||
21 | /usr/include/strings.h | ||
22 | /usr/include/stdc-predef.h: | ||
23 | libc-config.h: | ||
24 | ../config.h: | ||
25 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdalign.h: | ||
26 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stdbool.h: | ||
27 | /usr/include/assert.h: | ||
28 | /usr/include/features.h: | ||
29 | /usr/include/features-time64.h: | ||
30 | /usr/include/x86_64-linux-gnu/bits/wordsize.h: | ||
31 | /usr/include/x86_64-linux-gnu/bits/timesize.h: | ||
32 | /usr/include/x86_64-linux-gnu/sys/cdefs.h: | ||
33 | /usr/include/x86_64-linux-gnu/bits/long-double.h: | ||
34 | /usr/include/x86_64-linux-gnu/gnu/stubs.h: | ||
35 | /usr/include/x86_64-linux-gnu/gnu/stubs-64.h: | ||
36 | /usr/include/errno.h: | ||
37 | /usr/include/x86_64-linux-gnu/bits/errno.h: | ||
38 | /usr/include/linux/errno.h: | ||
39 | /usr/include/x86_64-linux-gnu/asm/errno.h: | ||
40 | /usr/include/asm-generic/errno.h: | ||
41 | /usr/include/asm-generic/errno-base.h: | ||
42 | /usr/include/x86_64-linux-gnu/bits/types/error_t.h: | ||
43 | dynarray.h: | ||
44 | malloc/dynarray.h: | ||
45 | /usr/lib/gcc/x86_64-linux-gnu/12/include/stddef.h: | ||
46 | string.h: | ||
47 | /usr/include/string.h: | ||
48 | /usr/include/x86_64-linux-gnu/bits/libc-header-start.h: | ||
49 | /usr/include/x86_64-linux-gnu/bits/types/locale_t.h: | ||
50 | /usr/include/x86_64-linux-gnu/bits/types/__locale_t.h: | ||
51 | strings.h: | ||
52 | /usr/include/strings.h: | ||
diff --git a/gl/malloc/.dirstamp b/gl/malloc/.dirstamp new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/gl/malloc/.dirstamp | |||
diff --git a/gl/malloc/dynarray-skeleton.gl.h b/gl/malloc/dynarray-skeleton.gl.h new file mode 100644 index 00000000..af95414f --- /dev/null +++ b/gl/malloc/dynarray-skeleton.gl.h | |||
@@ -0,0 +1,529 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* Type-safe arrays which grow dynamically. | ||
3 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | ||
4 | This file is part of the GNU C Library. | ||
5 | |||
6 | The GNU C Library is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU Lesser General Public | ||
8 | License as published by the Free Software Foundation; either | ||
9 | version 2.1 of the License, or (at your option) any later version. | ||
10 | |||
11 | The GNU C Library is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | Lesser General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU Lesser General Public | ||
17 | License along with the GNU C Library; if not, see | ||
18 | <https://www.gnu.org/licenses/>. */ | ||
19 | |||
20 | /* Pre-processor macros which act as parameters: | ||
21 | |||
22 | DYNARRAY_STRUCT | ||
23 | The struct tag of dynamic array to be defined. | ||
24 | DYNARRAY_ELEMENT | ||
25 | The type name of the element type. Elements are copied | ||
26 | as if by memcpy, and can change address as the dynamic | ||
27 | array grows. | ||
28 | DYNARRAY_PREFIX | ||
29 | The prefix of the functions which are defined. | ||
30 | |||
31 | The following parameters are optional: | ||
32 | |||
33 | DYNARRAY_ELEMENT_FREE | ||
34 | DYNARRAY_ELEMENT_FREE (E) is evaluated to deallocate the | ||
35 | contents of elements. E is of type DYNARRAY_ELEMENT *. | ||
36 | DYNARRAY_ELEMENT_INIT | ||
37 | DYNARRAY_ELEMENT_INIT (E) is evaluated to initialize a new | ||
38 | element. E is of type DYNARRAY_ELEMENT *. | ||
39 | If DYNARRAY_ELEMENT_FREE but not DYNARRAY_ELEMENT_INIT is | ||
40 | defined, new elements are automatically zero-initialized. | ||
41 | Otherwise, new elements have undefined contents. | ||
42 | DYNARRAY_INITIAL_SIZE | ||
43 | The size of the statically allocated array (default: | ||
44 | at least 2, more elements if they fit into 128 bytes). | ||
45 | Must be a preprocessor constant. If DYNARRAY_INITIAL_SIZE is 0, | ||
46 | there is no statically allocated array at, and all non-empty | ||
47 | arrays are heap-allocated. | ||
48 | DYNARRAY_FINAL_TYPE | ||
49 | The name of the type which holds the final array. If not | ||
50 | defined, is PREFIX##finalize not provided. DYNARRAY_FINAL_TYPE | ||
51 | must be a struct type, with members of type DYNARRAY_ELEMENT and | ||
52 | size_t at the start (in this order). | ||
53 | |||
54 | These macros are undefined after this header file has been | ||
55 | included. | ||
56 | |||
57 | The following types are provided (their members are private to the | ||
58 | dynarray implementation): | ||
59 | |||
60 | struct DYNARRAY_STRUCT | ||
61 | |||
62 | The following functions are provided: | ||
63 | |||
64 | void DYNARRAY_PREFIX##init (struct DYNARRAY_STRUCT *); | ||
65 | void DYNARRAY_PREFIX##free (struct DYNARRAY_STRUCT *); | ||
66 | bool DYNARRAY_PREFIX##has_failed (const struct DYNARRAY_STRUCT *); | ||
67 | void DYNARRAY_PREFIX##mark_failed (struct DYNARRAY_STRUCT *); | ||
68 | size_t DYNARRAY_PREFIX##size (const struct DYNARRAY_STRUCT *); | ||
69 | DYNARRAY_ELEMENT *DYNARRAY_PREFIX##begin (const struct DYNARRAY_STRUCT *); | ||
70 | DYNARRAY_ELEMENT *DYNARRAY_PREFIX##end (const struct DYNARRAY_STRUCT *); | ||
71 | DYNARRAY_ELEMENT *DYNARRAY_PREFIX##at (struct DYNARRAY_STRUCT *, size_t); | ||
72 | void DYNARRAY_PREFIX##add (struct DYNARRAY_STRUCT *, DYNARRAY_ELEMENT); | ||
73 | DYNARRAY_ELEMENT *DYNARRAY_PREFIX##emplace (struct DYNARRAY_STRUCT *); | ||
74 | bool DYNARRAY_PREFIX##resize (struct DYNARRAY_STRUCT *, size_t); | ||
75 | void DYNARRAY_PREFIX##remove_last (struct DYNARRAY_STRUCT *); | ||
76 | void DYNARRAY_PREFIX##clear (struct DYNARRAY_STRUCT *); | ||
77 | |||
78 | The following functions are provided are provided if the | ||
79 | prerequisites are met: | ||
80 | |||
81 | bool DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *, | ||
82 | DYNARRAY_FINAL_TYPE *); | ||
83 | (if DYNARRAY_FINAL_TYPE is defined) | ||
84 | DYNARRAY_ELEMENT *DYNARRAY_PREFIX##finalize (struct DYNARRAY_STRUCT *, | ||
85 | size_t *); | ||
86 | (if DYNARRAY_FINAL_TYPE is not defined) | ||
87 | */ | ||
88 | |||
89 | #include <malloc/dynarray.gl.h> | ||
90 | |||
91 | #include <errno.h> | ||
92 | #include <stdlib.h> | ||
93 | #include <string.h> | ||
94 | |||
95 | #ifndef DYNARRAY_STRUCT | ||
96 | # error "DYNARRAY_STRUCT must be defined" | ||
97 | #endif | ||
98 | |||
99 | #ifndef DYNARRAY_ELEMENT | ||
100 | # error "DYNARRAY_ELEMENT must be defined" | ||
101 | #endif | ||
102 | |||
103 | #ifndef DYNARRAY_PREFIX | ||
104 | # error "DYNARRAY_PREFIX must be defined" | ||
105 | #endif | ||
106 | |||
107 | #ifdef DYNARRAY_INITIAL_SIZE | ||
108 | # if DYNARRAY_INITIAL_SIZE < 0 | ||
109 | # error "DYNARRAY_INITIAL_SIZE must be non-negative" | ||
110 | # endif | ||
111 | # if DYNARRAY_INITIAL_SIZE > 0 | ||
112 | # define DYNARRAY_HAVE_SCRATCH 1 | ||
113 | # else | ||
114 | # define DYNARRAY_HAVE_SCRATCH 0 | ||
115 | # endif | ||
116 | #else | ||
117 | /* Provide a reasonable default which limits the size of | ||
118 | DYNARRAY_STRUCT. */ | ||
119 | # define DYNARRAY_INITIAL_SIZE \ | ||
120 | (sizeof (DYNARRAY_ELEMENT) > 64 ? 2 : 128 / sizeof (DYNARRAY_ELEMENT)) | ||
121 | # define DYNARRAY_HAVE_SCRATCH 1 | ||
122 | #endif | ||
123 | |||
124 | /* Public type definitions. */ | ||
125 | |||
126 | /* All fields of this struct are private to the implementation. */ | ||
127 | struct DYNARRAY_STRUCT | ||
128 | { | ||
129 | union | ||
130 | { | ||
131 | struct dynarray_header dynarray_abstract; | ||
132 | struct | ||
133 | { | ||
134 | /* These fields must match struct dynarray_header. */ | ||
135 | size_t used; | ||
136 | size_t allocated; | ||
137 | DYNARRAY_ELEMENT *array; | ||
138 | } dynarray_header; | ||
139 | } u; | ||
140 | |||
141 | #if DYNARRAY_HAVE_SCRATCH | ||
142 | /* Initial inline allocation. */ | ||
143 | DYNARRAY_ELEMENT scratch[DYNARRAY_INITIAL_SIZE]; | ||
144 | #endif | ||
145 | }; | ||
146 | |||
147 | /* Internal use only: Helper macros. */ | ||
148 | |||
149 | /* Ensure macro-expansion of DYNARRAY_PREFIX. */ | ||
150 | #define DYNARRAY_CONCAT0(prefix, name) prefix##name | ||
151 | #define DYNARRAY_CONCAT1(prefix, name) DYNARRAY_CONCAT0(prefix, name) | ||
152 | #define DYNARRAY_NAME(name) DYNARRAY_CONCAT1(DYNARRAY_PREFIX, name) | ||
153 | |||
154 | /* Use DYNARRAY_FREE instead of DYNARRAY_NAME (free), | ||
155 | so that Gnulib does not change 'free' to 'rpl_free'. */ | ||
156 | #define DYNARRAY_FREE DYNARRAY_CONCAT1 (DYNARRAY_NAME (f), ree) | ||
157 | |||
158 | /* Address of the scratch buffer if any. */ | ||
159 | #if DYNARRAY_HAVE_SCRATCH | ||
160 | # define DYNARRAY_SCRATCH(list) (list)->scratch | ||
161 | #else | ||
162 | # define DYNARRAY_SCRATCH(list) NULL | ||
163 | #endif | ||
164 | |||
165 | /* Internal use only: Helper functions. */ | ||
166 | |||
167 | /* Internal function. Call DYNARRAY_ELEMENT_FREE with the array | ||
168 | elements. Name mangling needed due to the DYNARRAY_ELEMENT_FREE | ||
169 | macro expansion. */ | ||
170 | static inline void | ||
171 | DYNARRAY_NAME (free__elements__) (DYNARRAY_ELEMENT *__dynarray_array, | ||
172 | size_t __dynarray_used) | ||
173 | { | ||
174 | #ifdef DYNARRAY_ELEMENT_FREE | ||
175 | for (size_t __dynarray_i = 0; __dynarray_i < __dynarray_used; ++__dynarray_i) | ||
176 | DYNARRAY_ELEMENT_FREE (&__dynarray_array[__dynarray_i]); | ||
177 | #endif /* DYNARRAY_ELEMENT_FREE */ | ||
178 | } | ||
179 | |||
180 | /* Internal function. Free the non-scratch array allocation. */ | ||
181 | static inline void | ||
182 | DYNARRAY_NAME (free__array__) (struct DYNARRAY_STRUCT *list) | ||
183 | { | ||
184 | #if DYNARRAY_HAVE_SCRATCH | ||
185 | if (list->u.dynarray_header.array != list->scratch) | ||
186 | free (list->u.dynarray_header.array); | ||
187 | #else | ||
188 | free (list->u.dynarray_header.array); | ||
189 | #endif | ||
190 | } | ||
191 | |||
192 | /* Public functions. */ | ||
193 | |||
194 | /* Initialize a dynamic array object. This must be called before any | ||
195 | use of the object. */ | ||
196 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
197 | static void | ||
198 | DYNARRAY_NAME (init) (struct DYNARRAY_STRUCT *list) | ||
199 | { | ||
200 | list->u.dynarray_header.used = 0; | ||
201 | list->u.dynarray_header.allocated = DYNARRAY_INITIAL_SIZE; | ||
202 | list->u.dynarray_header.array = DYNARRAY_SCRATCH (list); | ||
203 | } | ||
204 | |||
205 | /* Deallocate the dynamic array and its elements. */ | ||
206 | _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) | ||
207 | static void | ||
208 | DYNARRAY_FREE (struct DYNARRAY_STRUCT *list) | ||
209 | { | ||
210 | DYNARRAY_NAME (free__elements__) | ||
211 | (list->u.dynarray_header.array, list->u.dynarray_header.used); | ||
212 | DYNARRAY_NAME (free__array__) (list); | ||
213 | DYNARRAY_NAME (init) (list); | ||
214 | } | ||
215 | |||
216 | /* Return true if the dynamic array is in an error state. */ | ||
217 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
218 | static inline bool | ||
219 | DYNARRAY_NAME (has_failed) (const struct DYNARRAY_STRUCT *list) | ||
220 | { | ||
221 | return list->u.dynarray_header.allocated == __dynarray_error_marker (); | ||
222 | } | ||
223 | |||
224 | /* Mark the dynamic array as failed. All elements are deallocated as | ||
225 | a side effect. */ | ||
226 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
227 | static void | ||
228 | DYNARRAY_NAME (mark_failed) (struct DYNARRAY_STRUCT *list) | ||
229 | { | ||
230 | DYNARRAY_NAME (free__elements__) | ||
231 | (list->u.dynarray_header.array, list->u.dynarray_header.used); | ||
232 | DYNARRAY_NAME (free__array__) (list); | ||
233 | list->u.dynarray_header.array = DYNARRAY_SCRATCH (list); | ||
234 | list->u.dynarray_header.used = 0; | ||
235 | list->u.dynarray_header.allocated = __dynarray_error_marker (); | ||
236 | } | ||
237 | |||
238 | /* Return the number of elements which have been added to the dynamic | ||
239 | array. */ | ||
240 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
241 | static inline size_t | ||
242 | DYNARRAY_NAME (size) (const struct DYNARRAY_STRUCT *list) | ||
243 | { | ||
244 | return list->u.dynarray_header.used; | ||
245 | } | ||
246 | |||
247 | /* Return a pointer to the array element at INDEX. Terminate the | ||
248 | process if INDEX is out of bounds. */ | ||
249 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
250 | static inline DYNARRAY_ELEMENT * | ||
251 | DYNARRAY_NAME (at) (struct DYNARRAY_STRUCT *list, size_t index) | ||
252 | { | ||
253 | if (_GL_UNLIKELY (index >= DYNARRAY_NAME (size) (list))) | ||
254 | __libc_dynarray_at_failure (DYNARRAY_NAME (size) (list), index); | ||
255 | return list->u.dynarray_header.array + index; | ||
256 | } | ||
257 | |||
258 | /* Return a pointer to the first array element, if any. For a | ||
259 | zero-length array, the pointer can be NULL even though the dynamic | ||
260 | array has not entered the failure state. */ | ||
261 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
262 | static inline DYNARRAY_ELEMENT * | ||
263 | DYNARRAY_NAME (begin) (struct DYNARRAY_STRUCT *list) | ||
264 | { | ||
265 | return list->u.dynarray_header.array; | ||
266 | } | ||
267 | |||
268 | /* Return a pointer one element past the last array element. For a | ||
269 | zero-length array, the pointer can be NULL even though the dynamic | ||
270 | array has not entered the failure state. */ | ||
271 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
272 | static inline DYNARRAY_ELEMENT * | ||
273 | DYNARRAY_NAME (end) (struct DYNARRAY_STRUCT *list) | ||
274 | { | ||
275 | return list->u.dynarray_header.array + list->u.dynarray_header.used; | ||
276 | } | ||
277 | |||
278 | /* Internal function. Slow path for the add function below. */ | ||
279 | static void | ||
280 | DYNARRAY_NAME (add__) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) | ||
281 | { | ||
282 | if (_GL_UNLIKELY | ||
283 | (!__libc_dynarray_emplace_enlarge (&list->u.dynarray_abstract, | ||
284 | DYNARRAY_SCRATCH (list), | ||
285 | sizeof (DYNARRAY_ELEMENT)))) | ||
286 | { | ||
287 | DYNARRAY_NAME (mark_failed) (list); | ||
288 | return; | ||
289 | } | ||
290 | |||
291 | /* Copy the new element and increase the array length. */ | ||
292 | list->u.dynarray_header.array[list->u.dynarray_header.used++] = item; | ||
293 | } | ||
294 | |||
295 | /* Add ITEM at the end of the array, enlarging it by one element. | ||
296 | Mark *LIST as failed if the dynamic array allocation size cannot be | ||
297 | increased. */ | ||
298 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
299 | static inline void | ||
300 | DYNARRAY_NAME (add) (struct DYNARRAY_STRUCT *list, DYNARRAY_ELEMENT item) | ||
301 | { | ||
302 | /* Do nothing in case of previous error. */ | ||
303 | if (DYNARRAY_NAME (has_failed) (list)) | ||
304 | return; | ||
305 | |||
306 | /* Enlarge the array if necessary. */ | ||
307 | if (_GL_UNLIKELY (list->u.dynarray_header.used | ||
308 | == list->u.dynarray_header.allocated)) | ||
309 | { | ||
310 | DYNARRAY_NAME (add__) (list, item); | ||
311 | return; | ||
312 | } | ||
313 | |||
314 | /* Copy the new element and increase the array length. */ | ||
315 | list->u.dynarray_header.array[list->u.dynarray_header.used++] = item; | ||
316 | } | ||
317 | |||
318 | /* Internal function. Building block for the emplace functions below. | ||
319 | Assumes space for one more element in *LIST. */ | ||
320 | static inline DYNARRAY_ELEMENT * | ||
321 | DYNARRAY_NAME (emplace__tail__) (struct DYNARRAY_STRUCT *list) | ||
322 | { | ||
323 | DYNARRAY_ELEMENT *result | ||
324 | = &list->u.dynarray_header.array[list->u.dynarray_header.used]; | ||
325 | ++list->u.dynarray_header.used; | ||
326 | #if defined (DYNARRAY_ELEMENT_INIT) | ||
327 | DYNARRAY_ELEMENT_INIT (result); | ||
328 | #elif defined (DYNARRAY_ELEMENT_FREE) | ||
329 | memset (result, 0, sizeof (*result)); | ||
330 | #endif | ||
331 | return result; | ||
332 | } | ||
333 | |||
334 | /* Internal function. Slow path for the emplace function below. */ | ||
335 | static DYNARRAY_ELEMENT * | ||
336 | DYNARRAY_NAME (emplace__) (struct DYNARRAY_STRUCT *list) | ||
337 | { | ||
338 | if (_GL_UNLIKELY | ||
339 | (!__libc_dynarray_emplace_enlarge (&list->u.dynarray_abstract, | ||
340 | DYNARRAY_SCRATCH (list), | ||
341 | sizeof (DYNARRAY_ELEMENT)))) | ||
342 | { | ||
343 | DYNARRAY_NAME (mark_failed) (list); | ||
344 | return NULL; | ||
345 | } | ||
346 | return DYNARRAY_NAME (emplace__tail__) (list); | ||
347 | } | ||
348 | |||
349 | /* Allocate a place for a new element in *LIST and return a pointer to | ||
350 | it. The pointer can be NULL if the dynamic array cannot be | ||
351 | enlarged due to a memory allocation failure. */ | ||
352 | _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NODISCARD | ||
353 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
354 | static | ||
355 | /* Avoid inlining with the larger initialization code. */ | ||
356 | #if !(defined (DYNARRAY_ELEMENT_INIT) || defined (DYNARRAY_ELEMENT_FREE)) | ||
357 | inline | ||
358 | #endif | ||
359 | DYNARRAY_ELEMENT * | ||
360 | DYNARRAY_NAME (emplace) (struct DYNARRAY_STRUCT *list) | ||
361 | { | ||
362 | /* Do nothing in case of previous error. */ | ||
363 | if (DYNARRAY_NAME (has_failed) (list)) | ||
364 | return NULL; | ||
365 | |||
366 | /* Enlarge the array if necessary. */ | ||
367 | if (_GL_UNLIKELY (list->u.dynarray_header.used | ||
368 | == list->u.dynarray_header.allocated)) | ||
369 | return (DYNARRAY_NAME (emplace__) (list)); | ||
370 | return DYNARRAY_NAME (emplace__tail__) (list); | ||
371 | } | ||
372 | |||
373 | /* Change the size of *LIST to SIZE. If SIZE is larger than the | ||
374 | existing size, new elements are added (which can be initialized). | ||
375 | Otherwise, the list is truncated, and elements are freed. Return | ||
376 | false on memory allocation failure (and mark *LIST as failed). */ | ||
377 | _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) | ||
378 | static bool | ||
379 | DYNARRAY_NAME (resize) (struct DYNARRAY_STRUCT *list, size_t size) | ||
380 | { | ||
381 | if (size > list->u.dynarray_header.used) | ||
382 | { | ||
383 | bool ok; | ||
384 | #if defined (DYNARRAY_ELEMENT_INIT) | ||
385 | /* The new elements have to be initialized. */ | ||
386 | size_t old_size = list->u.dynarray_header.used; | ||
387 | ok = __libc_dynarray_resize (&list->u.dynarray_abstract, | ||
388 | size, DYNARRAY_SCRATCH (list), | ||
389 | sizeof (DYNARRAY_ELEMENT)); | ||
390 | if (ok) | ||
391 | for (size_t i = old_size; i < size; ++i) | ||
392 | { | ||
393 | DYNARRAY_ELEMENT_INIT (&list->u.dynarray_header.array[i]); | ||
394 | } | ||
395 | #elif defined (DYNARRAY_ELEMENT_FREE) | ||
396 | /* Zero initialization is needed so that the elements can be | ||
397 | safely freed. */ | ||
398 | ok = __libc_dynarray_resize_clear | ||
399 | (&list->u.dynarray_abstract, size, | ||
400 | DYNARRAY_SCRATCH (list), sizeof (DYNARRAY_ELEMENT)); | ||
401 | #else | ||
402 | ok = __libc_dynarray_resize (&list->u.dynarray_abstract, | ||
403 | size, DYNARRAY_SCRATCH (list), | ||
404 | sizeof (DYNARRAY_ELEMENT)); | ||
405 | #endif | ||
406 | if (_GL_UNLIKELY (!ok)) | ||
407 | DYNARRAY_NAME (mark_failed) (list); | ||
408 | return ok; | ||
409 | } | ||
410 | else | ||
411 | { | ||
412 | /* The list has shrunk in size. Free the removed elements. */ | ||
413 | DYNARRAY_NAME (free__elements__) | ||
414 | (list->u.dynarray_header.array + size, | ||
415 | list->u.dynarray_header.used - size); | ||
416 | list->u.dynarray_header.used = size; | ||
417 | return true; | ||
418 | } | ||
419 | } | ||
420 | |||
421 | /* Remove the last element of LIST if it is present. */ | ||
422 | _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) | ||
423 | static void | ||
424 | DYNARRAY_NAME (remove_last) (struct DYNARRAY_STRUCT *list) | ||
425 | { | ||
426 | /* used > 0 implies that the array is the non-failed state. */ | ||
427 | if (list->u.dynarray_header.used > 0) | ||
428 | { | ||
429 | size_t new_length = list->u.dynarray_header.used - 1; | ||
430 | #ifdef DYNARRAY_ELEMENT_FREE | ||
431 | DYNARRAY_ELEMENT_FREE (&list->u.dynarray_header.array[new_length]); | ||
432 | #endif | ||
433 | list->u.dynarray_header.used = new_length; | ||
434 | } | ||
435 | } | ||
436 | |||
437 | /* Remove all elements from the list. The elements are freed, but the | ||
438 | list itself is not. */ | ||
439 | _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NONNULL ((1)) | ||
440 | static void | ||
441 | DYNARRAY_NAME (clear) (struct DYNARRAY_STRUCT *list) | ||
442 | { | ||
443 | /* free__elements__ does nothing if the list is in the failed | ||
444 | state. */ | ||
445 | DYNARRAY_NAME (free__elements__) | ||
446 | (list->u.dynarray_header.array, list->u.dynarray_header.used); | ||
447 | list->u.dynarray_header.used = 0; | ||
448 | } | ||
449 | |||
450 | #ifdef DYNARRAY_FINAL_TYPE | ||
451 | /* Transfer the dynamic array to a permanent location at *RESULT. | ||
452 | Returns true on success on false on allocation failure. In either | ||
453 | case, *LIST is re-initialized and can be reused. A NULL pointer is | ||
454 | stored in *RESULT if LIST refers to an empty list. On success, the | ||
455 | pointer in *RESULT is heap-allocated and must be deallocated using | ||
456 | free. */ | ||
457 | _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NODISCARD | ||
458 | _GL_ATTRIBUTE_NONNULL ((1, 2)) | ||
459 | static bool | ||
460 | DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, | ||
461 | DYNARRAY_FINAL_TYPE *result) | ||
462 | { | ||
463 | struct dynarray_finalize_result res; | ||
464 | if (__libc_dynarray_finalize (&list->u.dynarray_abstract, | ||
465 | DYNARRAY_SCRATCH (list), | ||
466 | sizeof (DYNARRAY_ELEMENT), &res)) | ||
467 | { | ||
468 | /* On success, the result owns all the data. */ | ||
469 | DYNARRAY_NAME (init) (list); | ||
470 | *result = (DYNARRAY_FINAL_TYPE) { res.array, res.length }; | ||
471 | return true; | ||
472 | } | ||
473 | else | ||
474 | { | ||
475 | /* On error, we need to free all data. */ | ||
476 | DYNARRAY_FREE (list); | ||
477 | errno = ENOMEM; | ||
478 | return false; | ||
479 | } | ||
480 | } | ||
481 | #else /* !DYNARRAY_FINAL_TYPE */ | ||
482 | /* Transfer the dynamic array to a heap-allocated array and return a | ||
483 | pointer to it. The pointer is NULL if memory allocation fails, or | ||
484 | if the array is empty, so this function should be used only for | ||
485 | arrays which are known not be empty (usually because they always | ||
486 | have a sentinel at the end). If LENGTHP is not NULL, the array | ||
487 | length is written to *LENGTHP. *LIST is re-initialized and can be | ||
488 | reused. */ | ||
489 | _GL_ATTRIBUTE_MAYBE_UNUSED _GL_ATTRIBUTE_NODISCARD | ||
490 | _GL_ATTRIBUTE_NONNULL ((1)) | ||
491 | static DYNARRAY_ELEMENT * | ||
492 | DYNARRAY_NAME (finalize) (struct DYNARRAY_STRUCT *list, size_t *lengthp) | ||
493 | { | ||
494 | struct dynarray_finalize_result res; | ||
495 | if (__libc_dynarray_finalize (&list->u.dynarray_abstract, | ||
496 | DYNARRAY_SCRATCH (list), | ||
497 | sizeof (DYNARRAY_ELEMENT), &res)) | ||
498 | { | ||
499 | /* On success, the result owns all the data. */ | ||
500 | DYNARRAY_NAME (init) (list); | ||
501 | if (lengthp != NULL) | ||
502 | *lengthp = res.length; | ||
503 | return res.array; | ||
504 | } | ||
505 | else | ||
506 | { | ||
507 | /* On error, we need to free all data. */ | ||
508 | DYNARRAY_FREE (list); | ||
509 | errno = ENOMEM; | ||
510 | return NULL; | ||
511 | } | ||
512 | } | ||
513 | #endif /* !DYNARRAY_FINAL_TYPE */ | ||
514 | |||
515 | /* Undo macro definitions. */ | ||
516 | |||
517 | #undef DYNARRAY_CONCAT0 | ||
518 | #undef DYNARRAY_CONCAT1 | ||
519 | #undef DYNARRAY_NAME | ||
520 | #undef DYNARRAY_SCRATCH | ||
521 | #undef DYNARRAY_HAVE_SCRATCH | ||
522 | |||
523 | #undef DYNARRAY_STRUCT | ||
524 | #undef DYNARRAY_ELEMENT | ||
525 | #undef DYNARRAY_PREFIX | ||
526 | #undef DYNARRAY_ELEMENT_FREE | ||
527 | #undef DYNARRAY_ELEMENT_INIT | ||
528 | #undef DYNARRAY_INITIAL_SIZE | ||
529 | #undef DYNARRAY_FINAL_TYPE | ||
diff --git a/gl/malloc/dynarray.gl.h b/gl/malloc/dynarray.gl.h new file mode 100644 index 00000000..34987e79 --- /dev/null +++ b/gl/malloc/dynarray.gl.h | |||
@@ -0,0 +1,173 @@ | |||
1 | /* DO NOT EDIT! GENERATED AUTOMATICALLY! */ | ||
2 | /* Type-safe arrays which grow dynamically. Shared definitions. | ||
3 | Copyright (C) 2017-2023 Free Software Foundation, Inc. | ||
4 | This file is part of the GNU C Library. | ||
5 | |||
6 | The GNU C Library is free software; you can redistribute it and/or | ||
7 | modify it under the terms of the GNU Lesser General Public | ||
8 | License as published by the Free Software Foundation; either | ||
9 | version 2.1 of the License, or (at your option) any later version. | ||
10 | |||
11 | The GNU C Library is distributed in the hope that it will be useful, | ||
12 | but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
13 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
14 | Lesser General Public License for more details. | ||
15 | |||
16 | You should have received a copy of the GNU Lesser General Public | ||
17 | License along with the GNU C Library; if not, see | ||
18 | <https://www.gnu.org/licenses/>. */ | ||
19 | |||
20 | /* To use the dynarray facility, you need to include | ||
21 | <malloc/dynarray-skeleton.c> and define the parameter macros | ||
22 | documented in that file. | ||
23 | |||
24 | A minimal example which provides a growing list of integers can be | ||
25 | defined like this: | ||
26 | |||
27 | struct int_array | ||
28 | { | ||
29 | // Pointer to result array followed by its length, | ||
30 | // as required by DYNARRAY_FINAL_TYPE. | ||
31 | int *array; | ||
32 | size_t length; | ||
33 | }; | ||
34 | |||
35 | #define DYNARRAY_STRUCT dynarray_int | ||
36 | #define DYNARRAY_ELEMENT int | ||
37 | #define DYNARRAY_PREFIX dynarray_int_ | ||
38 | #define DYNARRAY_FINAL_TYPE struct int_array | ||
39 | #include <malloc/dynarray-skeleton.c> | ||
40 | |||
41 | To create a three-element array with elements 1, 2, 3, use this | ||
42 | code: | ||
43 | |||
44 | struct dynarray_int dyn; | ||
45 | dynarray_int_init (&dyn); | ||
46 | for (int i = 1; i <= 3; ++i) | ||
47 | { | ||
48 | int *place = dynarray_int_emplace (&dyn); | ||
49 | assert (place != NULL); | ||
50 | *place = i; | ||
51 | } | ||
52 | struct int_array result; | ||
53 | bool ok = dynarray_int_finalize (&dyn, &result); | ||
54 | assert (ok); | ||
55 | assert (result.length == 3); | ||
56 | assert (result.array[0] == 1); | ||
57 | assert (result.array[1] == 2); | ||
58 | assert (result.array[2] == 3); | ||
59 | free (result.array); | ||
60 | |||
61 | If the elements contain resources which must be freed, define | ||
62 | DYNARRAY_ELEMENT_FREE appropriately, like this: | ||
63 | |||
64 | struct str_array | ||
65 | { | ||
66 | char **array; | ||
67 | size_t length; | ||
68 | }; | ||
69 | |||
70 | #define DYNARRAY_STRUCT dynarray_str | ||
71 | #define DYNARRAY_ELEMENT char * | ||
72 | #define DYNARRAY_ELEMENT_FREE(ptr) free (*ptr) | ||
73 | #define DYNARRAY_PREFIX dynarray_str_ | ||
74 | #define DYNARRAY_FINAL_TYPE struct str_array | ||
75 | #include <malloc/dynarray-skeleton.c> | ||
76 | |||
77 | Compared to scratch buffers, dynamic arrays have the following | ||
78 | features: | ||
79 | |||
80 | - They have an element type, and are not just an untyped buffer of | ||
81 | bytes. | ||
82 | |||
83 | - When growing, previously stored elements are preserved. (It is | ||
84 | expected that scratch_buffer_grow_preserve and | ||
85 | scratch_buffer_set_array_size eventually go away because all | ||
86 | current users are moved to dynamic arrays.) | ||
87 | |||
88 | - Scratch buffers have a more aggressive growth policy because | ||
89 | growing them typically means a retry of an operation (across an | ||
90 | NSS service module boundary), which is expensive. | ||
91 | |||
92 | - For the same reason, scratch buffers have a much larger initial | ||
93 | stack allocation. */ | ||
94 | |||
95 | #ifndef _DYNARRAY_H | ||
96 | #define _DYNARRAY_H | ||
97 | |||
98 | #include <stddef.h> | ||
99 | #include <string.h> | ||
100 | |||
101 | struct dynarray_header | ||
102 | { | ||
103 | size_t used; | ||
104 | size_t allocated; | ||
105 | void *array; | ||
106 | }; | ||
107 | |||
108 | /* Marker used in the allocated member to indicate that an error was | ||
109 | encountered. */ | ||
110 | static inline size_t | ||
111 | __dynarray_error_marker (void) | ||
112 | { | ||
113 | return -1; | ||
114 | } | ||
115 | |||
116 | /* Internal function. See the has_failed function in | ||
117 | dynarray-skeleton.c. */ | ||
118 | static inline bool | ||
119 | __dynarray_error (struct dynarray_header *list) | ||
120 | { | ||
121 | return list->allocated == __dynarray_error_marker (); | ||
122 | } | ||
123 | |||
124 | /* Internal function. Enlarge the dynamically allocated area of the | ||
125 | array to make room for one more element. SCRATCH is a pointer to | ||
126 | the scratch area (which is not heap-allocated and must not be | ||
127 | freed). ELEMENT_SIZE is the size, in bytes, of one element. | ||
128 | Return false on failure, true on success. */ | ||
129 | bool __libc_dynarray_emplace_enlarge (struct dynarray_header *, | ||
130 | void *scratch, size_t element_size); | ||
131 | |||
132 | /* Internal function. Enlarge the dynamically allocated area of the | ||
133 | array to make room for at least SIZE elements (which must be larger | ||
134 | than the existing used part of the dynamic array). SCRATCH is a | ||
135 | pointer to the scratch area (which is not heap-allocated and must | ||
136 | not be freed). ELEMENT_SIZE is the size, in bytes, of one element. | ||
137 | Return false on failure, true on success. */ | ||
138 | bool __libc_dynarray_resize (struct dynarray_header *, size_t size, | ||
139 | void *scratch, size_t element_size); | ||
140 | |||
141 | /* Internal function. Like __libc_dynarray_resize, but clear the new | ||
142 | part of the dynamic array. */ | ||
143 | bool __libc_dynarray_resize_clear (struct dynarray_header *, size_t size, | ||
144 | void *scratch, size_t element_size); | ||
145 | |||
146 | /* Internal type. */ | ||
147 | struct dynarray_finalize_result | ||
148 | { | ||
149 | void *array; | ||
150 | size_t length; | ||
151 | }; | ||
152 | |||
153 | /* Internal function. Copy the dynamically-allocated area to an | ||
154 | explicitly-sized heap allocation. SCRATCH is a pointer to the | ||
155 | embedded scratch space. ELEMENT_SIZE is the size, in bytes, of the | ||
156 | element type. On success, true is returned, and pointer and length | ||
157 | are written to *RESULT. On failure, false is returned. The caller | ||
158 | has to take care of some of the memory management; this function is | ||
159 | expected to be called from dynarray-skeleton.c. */ | ||
160 | bool __libc_dynarray_finalize (struct dynarray_header *list, void *scratch, | ||
161 | size_t element_size, | ||
162 | struct dynarray_finalize_result *result); | ||
163 | |||
164 | |||
165 | /* Internal function. Terminate the process after an index error. | ||
166 | SIZE is the number of elements of the dynamic array. INDEX is the | ||
167 | lookup index which triggered the failure. */ | ||
168 | _Noreturn void __libc_dynarray_at_failure (size_t size, size_t index); | ||
169 | |||
170 | #ifndef _ISOMAC | ||
171 | #endif | ||
172 | |||
173 | #endif /* _DYNARRAY_H */ | ||