| 177 | } |
| 178 | |
| 179 | static unsigned obs_batch_malloc(malloc_zone_t *z, size_t size, void **results, unsigned count) { |
| 180 | (void)z; |
| 181 | unsigned got = g_orig->batch_malloc ? g_orig->batch_malloc(g_orig, size, results, count) : 0; |
| 182 | if (cbm_memev_enabled()) { |
| 183 | unsigned flags; |
| 184 | void *site = caller_site(__builtin_frame_address(0), &flags); |
| 185 | for (unsigned i = 0; i < got; i++) { |
| 186 | cbm_memev_alloc_ex(results[i], size, g_orig->size(g_orig, results[i]), site, flags); |
| 187 | } |
| 188 | } |
| 189 | return got; |
| 190 | } |
| 191 | |
| 192 | static void obs_batch_free(malloc_zone_t *z, void **blocks, unsigned count) { |
| 193 | (void)z; |
nothing calls this directly
no test coverage detected