Make malloc_write() non-inline.
Make malloc_write() non-inline, in order to resolve its dependency on je_malloc_write().
This commit is contained in:
parent
8d5865eb57
commit
889ec59bd3
@ -84,6 +84,7 @@
|
|||||||
|
|
||||||
int buferror(char *buf, size_t buflen);
|
int buferror(char *buf, size_t buflen);
|
||||||
uintmax_t malloc_strtoumax(const char *nptr, char **endptr, int base);
|
uintmax_t malloc_strtoumax(const char *nptr, char **endptr, int base);
|
||||||
|
void malloc_write(const char *s);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* malloc_vsnprintf() supports a subset of snprintf(3) that avoids floating
|
* malloc_vsnprintf() supports a subset of snprintf(3) that avoids floating
|
||||||
@ -130,17 +131,6 @@ pow2_ceil(size_t x)
|
|||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
* Wrapper around malloc_message() that avoids the need for
|
|
||||||
* je_malloc_message(...) throughout the code.
|
|
||||||
*/
|
|
||||||
JEMALLOC_INLINE void
|
|
||||||
malloc_write(const char *s)
|
|
||||||
{
|
|
||||||
|
|
||||||
je_malloc_message(NULL, s);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Sets error code */
|
/* Sets error code */
|
||||||
JEMALLOC_INLINE void
|
JEMALLOC_INLINE void
|
||||||
set_errno(int errnum)
|
set_errno(int errnum)
|
||||||
|
11
src/util.c
11
src/util.c
@ -59,6 +59,17 @@ wrtmessage(void *cbopaque, const char *s)
|
|||||||
JEMALLOC_EXPORT void (*je_malloc_message)(void *, const char *s) =
|
JEMALLOC_EXPORT void (*je_malloc_message)(void *, const char *s) =
|
||||||
wrtmessage;
|
wrtmessage;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Wrapper around malloc_message() that avoids the need for
|
||||||
|
* je_malloc_message(...) throughout the code.
|
||||||
|
*/
|
||||||
|
void
|
||||||
|
malloc_write(const char *s)
|
||||||
|
{
|
||||||
|
|
||||||
|
je_malloc_message(NULL, s);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* glibc provides a non-standard strerror_r() when _GNU_SOURCE is defined, so
|
* glibc provides a non-standard strerror_r() when _GNU_SOURCE is defined, so
|
||||||
* provide a wrapper.
|
* provide a wrapper.
|
||||||
|
Loading…
Reference in New Issue
Block a user