Lines Matching defs:alloc
4137 PyMemAllocatorEx alloc;
4153 return hook->alloc.malloc(hook->alloc.ctx, size);
4162 return hook->alloc.calloc(hook->alloc.ctx, nelem, elsize);
4171 return hook->alloc.realloc(hook->alloc.ctx, ptr, new_size);
4179 hook->alloc.free(hook->alloc.ctx, ptr);
4188 PyMemAllocatorEx alloc;
4194 alloc.ctx = &hook;
4195 alloc.malloc = &hook_malloc;
4196 alloc.calloc = &hook_calloc;
4197 alloc.realloc = &hook_realloc;
4198 alloc.free = &hook_free;
4199 PyMem_GetAllocator(domain, &hook.alloc);
4200 PyMem_SetAllocator(domain, &alloc);
4306 PyMem_SetAllocator(domain, &hook.alloc);
4359 PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
4363 return alloc->malloc(alloc->ctx, size);
4369 PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
4373 return alloc->calloc(alloc->ctx, nelem, elsize);
4379 PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
4383 return alloc->realloc(alloc->ctx, ptr, new_size);
4389 PyMemAllocatorEx *alloc = (PyMemAllocatorEx *)ctx;
4390 alloc->free(alloc->ctx, ptr);
4396 PyMemAllocatorEx alloc;
4403 alloc.malloc = hook_fmalloc;
4404 alloc.calloc = hook_fcalloc;
4405 alloc.realloc = hook_frealloc;
4406 alloc.free = hook_ffree;
4411 alloc.ctx = &FmHook.raw;
4412 PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &alloc);
4414 alloc.ctx = &FmHook.mem;
4415 PyMem_SetAllocator(PYMEM_DOMAIN_MEM, &alloc);
4417 alloc.ctx = &FmHook.obj;
4418 PyMem_SetAllocator(PYMEM_DOMAIN_OBJ, &alloc);