MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / obs_batch_malloc

Function obs_batch_malloc

src/foundation/mem_override_darwin.c:179–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

177}
178
179static 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
192static void obs_batch_free(malloc_zone_t *z, void **blocks, unsigned count) {
193 (void)z;

Callers

nothing calls this directly

Calls 4

cbm_memev_enabledFunction · 0.85
caller_siteFunction · 0.85
cbm_memev_alloc_exFunction · 0.85
sizeMethod · 0.45

Tested by

no test coverage detected