@@ -19,22 +19,22 @@ namespace snmalloc::libc
1919 return err;
2020 }
2121
22- SNMALLOC_USED_FUNCTION inline void * __malloc_end_pointer (void * ptr)
22+ SNMALLOC_API_SLOW void * __malloc_end_pointer (void * ptr)
2323 {
2424 return snmalloc::external_pointer<OnePastEnd>(ptr);
2525 }
2626
27- SNMALLOC_USED_FUNCTION inline void * __malloc_start_pointer (void * ptr)
27+ SNMALLOC_API_SLOW void * __malloc_start_pointer (void * ptr)
2828 {
2929 return snmalloc::external_pointer<Start>(ptr);
3030 }
3131
32- SNMALLOC_USED_FUNCTION inline void * __malloc_last_byte_pointer (void * ptr)
32+ SNMALLOC_API_SLOW void * __malloc_last_byte_pointer (void * ptr)
3333 {
3434 return snmalloc::external_pointer<End>(ptr);
3535 }
3636
37- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void * malloc (size_t size)
37+ SNMALLOC_API void * malloc (size_t size)
3838 {
3939 return snmalloc::alloc (size);
4040 }
@@ -43,7 +43,7 @@ namespace snmalloc::libc
4343 * Allocate for a pre-computed small sizeclass.
4444 * Use is_small_sizeclass() + size_to_sizeclass_const() to get the class.
4545 */
46- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void *
46+ SNMALLOC_API void *
4747 malloc_small (smallsizeclass_t sizeclass)
4848 {
4949 return snmalloc::alloc (sizeclass);
@@ -52,30 +52,30 @@ namespace snmalloc::libc
5252 /* *
5353 * Allocate zeroed memory for a pre-computed small sizeclass.
5454 */
55- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void *
55+ SNMALLOC_API void *
5656 malloc_small_zero (smallsizeclass_t sizeclass)
5757 {
5858 return snmalloc::alloc<Zero>(sizeclass);
5959 }
6060
61- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void free (void * ptr)
61+ SNMALLOC_API void free (void * ptr)
6262 {
6363 dealloc (ptr);
6464 }
6565
66- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void
66+ SNMALLOC_API void
6767 free_sized (void * ptr, size_t size)
6868 {
6969 dealloc (ptr, size);
7070 }
7171
72- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void
72+ SNMALLOC_API void
7373 free_aligned_sized (void * ptr, size_t alignment, size_t size)
7474 {
7575 dealloc (ptr, size, alignment);
7676 }
7777
78- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void *
78+ SNMALLOC_API void *
7979 calloc (size_t nmemb, size_t size)
8080 {
8181 bool overflow = false ;
@@ -87,7 +87,7 @@ namespace snmalloc::libc
8787 return alloc<Zero>(sz);
8888 }
8989
90- SNMALLOC_USED_FUNCTION SNMALLOC_FAST_PATH_INLINE void *
90+ SNMALLOC_API void *
9191 realloc (void * ptr, size_t size)
9292 {
9393 // Glibc treats
@@ -137,12 +137,12 @@ namespace snmalloc::libc
137137 return p;
138138 }
139139
140- SNMALLOC_USED_FUNCTION inline size_t malloc_usable_size (const void * ptr)
140+ SNMALLOC_API_SLOW size_t malloc_usable_size (const void * ptr)
141141 {
142142 return alloc_size (ptr);
143143 }
144144
145- SNMALLOC_USED_FUNCTION inline void *
145+ SNMALLOC_API_SLOW void *
146146 reallocarray (void * ptr, size_t nmemb, size_t size)
147147 {
148148 bool overflow = false ;
@@ -154,7 +154,7 @@ namespace snmalloc::libc
154154 return realloc (ptr, sz);
155155 }
156156
157- SNMALLOC_USED_FUNCTION inline int
157+ SNMALLOC_API_SLOW int
158158 reallocarr (void * ptr_, size_t nmemb, size_t size)
159159 {
160160 int err = errno;
@@ -190,7 +190,7 @@ namespace snmalloc::libc
190190 return 0 ;
191191 }
192192
193- SNMALLOC_USED_FUNCTION inline void *
193+ SNMALLOC_API_SLOW void *
194194 memalign (size_t alignment, size_t size)
195195 {
196196 if (SNMALLOC_UNLIKELY (alignment == 0 || !bits::is_pow2 (alignment)))
@@ -201,13 +201,13 @@ namespace snmalloc::libc
201201 return alloc_aligned (alignment, size);
202202 }
203203
204- SNMALLOC_USED_FUNCTION inline void *
204+ SNMALLOC_API_SLOW void *
205205 aligned_alloc (size_t alignment, size_t size)
206206 {
207207 return memalign (alignment, size);
208208 }
209209
210- SNMALLOC_USED_FUNCTION inline int
210+ SNMALLOC_API_SLOW int
211211 posix_memalign (void ** memptr, size_t alignment, size_t size)
212212 {
213213 if (SNMALLOC_UNLIKELY (
0 commit comments