mirror of
https://github.com/jemalloc/jemalloc.git
synced 2026-07-25 18:17:19 +03:00
Fix inlining warning.
Add the JEMALLOC_ALWAYS_INLINE_C macro and use it for always-inlined functions declared in .c files. This fixes a function attribute inconsistency for debug builds that resulted in (harmless) compiler warnings about functions not being inlinable. Reported by Ricardo Nabinger Sanchez.
This commit is contained in:
parent
3ab682d341
commit
543abf7e6c
2 changed files with 15 additions and 3 deletions
|
|
@ -282,7 +282,7 @@ arenas_cleanup(void *arg)
|
|||
malloc_mutex_unlock(&arenas_lock);
|
||||
}
|
||||
|
||||
static JEMALLOC_ATTR(always_inline) void
|
||||
JEMALLOC_ALWAYS_INLINE_C void
|
||||
malloc_thread_init(void)
|
||||
{
|
||||
|
||||
|
|
@ -299,7 +299,7 @@ malloc_thread_init(void)
|
|||
quarantine_alloc_hook();
|
||||
}
|
||||
|
||||
static JEMALLOC_ATTR(always_inline) bool
|
||||
JEMALLOC_ALWAYS_INLINE_C bool
|
||||
malloc_init(void)
|
||||
{
|
||||
|
||||
|
|
@ -1402,7 +1402,7 @@ je_mallctlbymib(const size_t *mib, size_t miblen, void *oldp, size_t *oldlenp,
|
|||
*/
|
||||
#ifdef JEMALLOC_EXPERIMENTAL
|
||||
|
||||
static JEMALLOC_ATTR(always_inline) void *
|
||||
JEMALLOC_ALWAYS_INLINE_C void *
|
||||
iallocm(size_t usize, size_t alignment, bool zero, bool try_tcache,
|
||||
arena_t *arena)
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue