Lines Matching defs:alloc

196     PyMemAllocatorEx alloc;
407 if (pymemallocator_eq(&_PyMem_Debug.raw.alloc, &malloc_alloc) &&
408 pymemallocator_eq(&_PyMem_Debug.mem.alloc, &malloc_alloc) &&
409 pymemallocator_eq(&_PyMem_Debug.obj.alloc, &malloc_alloc))
414 if (pymemallocator_eq(&_PyMem_Debug.raw.alloc, &malloc_alloc) &&
415 pymemallocator_eq(&_PyMem_Debug.mem.alloc, &pymalloc) &&
416 pymemallocator_eq(&_PyMem_Debug.obj.alloc, &pymalloc))
457 return (_PyMem_Debug.obj.alloc.malloc == _PyObject_Malloc);
469 PyMemAllocatorEx alloc;
476 PyMem_GetAllocator(PYMEM_DOMAIN_RAW, &_PyMem_Debug.raw.alloc);
477 alloc.ctx = &_PyMem_Debug.raw;
478 alloc.malloc = _PyMem_DebugRawMalloc;
479 alloc.calloc = _PyMem_DebugRawCalloc;
480 alloc.realloc = _PyMem_DebugRawRealloc;
481 alloc.free = _PyMem_DebugRawFree;
482 PyMem_SetAllocator(PYMEM_DOMAIN_RAW, &alloc);
489 PyMem_GetAllocator(PYMEM_DOMAIN_MEM, &_PyMem_Debug.mem.alloc);
490 alloc.ctx = &_PyMem_Debug.mem;
491 alloc.malloc = _PyMem_DebugMalloc;
492 alloc.calloc = _PyMem_DebugCalloc;
493 alloc.realloc = _PyMem_DebugRealloc;
494 alloc.free = _PyMem_DebugFree;
495 PyMem_SetAllocator(PYMEM_DOMAIN_MEM, &alloc);
502 PyMem_GetAllocator(PYMEM_DOMAIN_OBJ, &_PyMem_Debug.obj.alloc);
503 alloc.ctx = &_PyMem_Debug.obj;
504 alloc.malloc = _PyMem_DebugMalloc;
505 alloc.calloc = _PyMem_DebugCalloc;
506 alloc.realloc = _PyMem_DebugRealloc;
507 alloc.free = _PyMem_DebugFree;
508 PyMem_SetAllocator(PYMEM_DOMAIN_OBJ, &alloc);
560 return _PyObject_Arena.alloc(_PyObject_Arena.ctx, size);
1641 address = _PyObject_Arena.alloc(_PyObject_Arena.ctx, ARENA_SIZE);
1700 called on every alloc/realloc/free, micro-efficiency is important here).
2401 static size_t serialno = 0; /* incremented on each debug {m,re}alloc */
2505 p = (uint8_t *)api->alloc.calloc(api->alloc.ctx, 1, total);
2508 p = (uint8_t *)api->alloc.malloc(api->alloc.ctx, total);
2575 api->alloc.free(api->alloc.ctx, q);
2628 r = (uint8_t *)api->alloc.realloc(api->alloc.ctx, head, total);