Loading...
--- libmalloc/libmalloc-166.251.2/src/trace.h
+++ libmalloc/libmalloc-425.100.7/src/trace.h
@@ -30,8 +30,11 @@
#ifndef _MALLOC_BUILDING_CODES_
#include <sys/kdebug.h>
+__attribute__((cold))
+extern int
+kdebug_trace(uint32_t, uint64_t, uint64_t, uint64_t, uint64_t);
#define MALLOC_TRACE(code,arg1,arg2,arg3,arg4) \
- { if (malloc_tracing_enabled) { kdebug_trace(code, arg1, arg2, arg3, arg4); } }
+ { if (malloc_traced()) { kdebug_trace(code, arg1, arg2, arg3, arg4); } }
#define TRACE_CODE(name, subclass, code) \
static const int TRACE_##name = KDBG_EVENTID(DBG_UMALLOC, subclass, code)
#else
@@ -67,5 +70,7 @@
TRACE_CODE(medium_free, DBG_UMALLOC_INTERNAL, 0xd);
TRACE_CODE(nanov2_region_allocation, DBG_UMALLOC_INTERNAL, 0x10);
+TRACE_CODE(nanov2_region_reservation, DBG_UMALLOC_INTERNAL, 0x20);
+TRACE_CODE(nanov2_region_protection, DBG_UMALLOC_INTERNAL, 0x30);
#endif // __TRACE_H