| 98 | }; |
| 99 | |
| 100 | ATTRIBUTE_NO_SANITIZE_MEMORY |
| 101 | void MallocHook(const volatile void *ptr, size_t size) { |
| 102 | size_t N = AllocTracer.Mallocs++; |
| 103 | F->HandleMalloc(size); |
| 104 | if (int TraceLevel = AllocTracer.TraceLevel) { |
| 105 | TraceLock Lock; |
| 106 | if (Lock.IsDisabled()) |
| 107 | return; |
| 108 | Printf("MALLOC[%zd] %p %zd\n", N, ptr, size); |
| 109 | if (TraceLevel >= 2 && EF) |
| 110 | PrintStackTrace(); |
| 111 | } |
| 112 | } |
| 113 | |
| 114 | ATTRIBUTE_NO_SANITIZE_MEMORY |
| 115 | void FreeHook(const volatile void *ptr) { |
nothing calls this directly
no test coverage detected