Loading...
--- libmalloc/libmalloc-374.100.5/src/malloc_printf.c
+++ libmalloc/libmalloc-166.251.2/src/malloc_printf.c
@@ -98,7 +98,7 @@
if ((b = _simple_salloc()) == NULL) {
if (WRITE_TO_DEBUG_FILE(flags)) {
if (!(flags & MALLOC_REPORT_NOPREFIX)) {
- void *self = _pthread_self_direct();
+ void *self = _os_tsd_get_direct(__TSD_THREAD_SELF);
_simple_dprintf(malloc_debug_file, "%s(%d,%p) malloc: ", getprogname(), getpid(), self);
}
write(malloc_debug_file, msg, strlen(msg));
@@ -106,7 +106,7 @@
return;
}
if (!(flags & MALLOC_REPORT_NOPREFIX)) {
- void *self = _pthread_self_direct();
+ void *self = _os_tsd_get_direct(__TSD_THREAD_SELF);
_simple_sprintf(b, "%s(%d,%p) malloc: ", getprogname(), getpid(), self);
}
@@ -132,7 +132,7 @@
if ((b = _simple_salloc()) == NULL) {
if (WRITE_TO_DEBUG_FILE(flags)) {
if (!(flags & MALLOC_REPORT_NOPREFIX)) {
- void *self = _pthread_self_direct();
+ void *self = _os_tsd_get_direct(__TSD_THREAD_SELF);
_simple_dprintf(malloc_debug_file, "%s(%d,%p) malloc: ", getprogname(), getpid(), self);
}
if (prefix_msg) {
@@ -145,7 +145,7 @@
}
} else {
if (!(flags & MALLOC_REPORT_NOPREFIX)) {
- void *self = _pthread_self_direct();
+ void *self = _os_tsd_get_direct(__TSD_THREAD_SELF);
_simple_sprintf(b, "%s(%d,%p) malloc: ", getprogname(), getpid(), self);
}
if (prefix_msg) {
@@ -190,16 +190,6 @@
va_list ap;
va_start(ap, fmt);
malloc_vreport(flags, _malloc_default_debug_sleep_time(), NULL, NULL, fmt, ap);
- va_end(ap);
-}
-
-MALLOC_NOEXPORT void
-malloc_report_simple(const char *fmt, ...)
-{
- va_list ap;
- va_start(ap, fmt);
- malloc_vreport(MALLOC_REPORT_NOLOG | MALLOC_REPORT_NOPREFIX,
- _malloc_default_debug_sleep_time(), NULL, NULL, fmt, ap);
va_end(ap);
}