Lines Matching refs:nbytes
1196 size_t nbytes; in new_arena() local
1208 nbytes = numarenas * sizeof(*arenas); in new_arena()
1209 arenaobj = (struct arena_object *)PyMem_RawRealloc(arenas, nbytes); in new_arena()
1380 pymalloc_alloc(void *ctx, void **ptr_p, size_t nbytes) in pymalloc_alloc() argument
1396 if (nbytes == 0) { in pymalloc_alloc()
1399 if (nbytes > SMALL_REQUEST_THRESHOLD) { in pymalloc_alloc()
1407 size = (uint)(nbytes - 1) >> ALIGNMENT_SHIFT; in pymalloc_alloc()
1571 _PyObject_Malloc(void *ctx, size_t nbytes) in _PyObject_Malloc() argument
1574 if (pymalloc_alloc(ctx, &ptr, nbytes)) { in _PyObject_Malloc()
1579 ptr = PyMem_RawMalloc(nbytes); in _PyObject_Malloc()
1593 size_t nbytes = nelem * elsize; in _PyObject_Calloc() local
1595 if (pymalloc_alloc(ctx, &ptr, nbytes)) { in _PyObject_Calloc()
1596 memset(ptr, 0, nbytes); in _PyObject_Calloc()
1851 pymalloc_realloc(void *ctx, void **newptr_p, void *p, size_t nbytes) in pymalloc_realloc() argument
1885 if (nbytes <= size) { in pymalloc_realloc()
1893 if (4 * nbytes > 3 * size) { in pymalloc_realloc()
1898 size = nbytes; in pymalloc_realloc()
1901 bp = _PyObject_Malloc(ctx, nbytes); in pymalloc_realloc()
1912 _PyObject_Realloc(void *ctx, void *ptr, size_t nbytes) in _PyObject_Realloc() argument
1917 return _PyObject_Malloc(ctx, nbytes); in _PyObject_Realloc()
1920 if (pymalloc_realloc(ctx, &ptr2, ptr, nbytes)) { in _PyObject_Realloc()
1924 return PyMem_RawRealloc(ptr, nbytes); in _PyObject_Realloc()
2026 _PyMem_DebugRawAlloc(int use_calloc, void *ctx, size_t nbytes) in _PyMem_DebugRawAlloc() argument
2034 if (nbytes > (size_t)PY_SSIZE_T_MAX - 4 * SST) { in _PyMem_DebugRawAlloc()
2038 total = nbytes + 4 * SST; in _PyMem_DebugRawAlloc()
2062 write_size_t(p, nbytes); in _PyMem_DebugRawAlloc()
2066 if (nbytes > 0 && !use_calloc) { in _PyMem_DebugRawAlloc()
2067 memset(data, CLEANBYTE, nbytes); in _PyMem_DebugRawAlloc()
2071 tail = data + nbytes; in _PyMem_DebugRawAlloc()
2079 _PyMem_DebugRawMalloc(void *ctx, size_t nbytes) in _PyMem_DebugRawMalloc() argument
2081 return _PyMem_DebugRawAlloc(0, ctx, nbytes); in _PyMem_DebugRawMalloc()
2087 size_t nbytes; in _PyMem_DebugRawCalloc() local
2089 nbytes = nelem * elsize; in _PyMem_DebugRawCalloc()
2090 return _PyMem_DebugRawAlloc(1, ctx, nbytes); in _PyMem_DebugRawCalloc()
2125 size_t nbytes; in _PyMem_DebugRawFree() local
2128 nbytes = read_size_t(q); in _PyMem_DebugRawFree()
2129 nbytes += 4 * SST; in _PyMem_DebugRawFree()
2130 memset(q, DEADBYTE, nbytes); in _PyMem_DebugRawFree()
2136 _PyMem_DebugRawRealloc(void *ctx, void *p, size_t nbytes) in _PyMem_DebugRawRealloc() argument
2139 return _PyMem_DebugRawAlloc(0, ctx, nbytes); in _PyMem_DebugRawRealloc()
2158 if (nbytes > (size_t)PY_SSIZE_T_MAX - 4*SST) { in _PyMem_DebugRawRealloc()
2162 total = nbytes + 4*SST; in _PyMem_DebugRawRealloc()
2183 nbytes = original_nbytes; in _PyMem_DebugRawRealloc()
2191 write_size_t(head, nbytes); in _PyMem_DebugRawRealloc()
2196 tail = data + nbytes; in _PyMem_DebugRawRealloc()
2202 memcpy(data, save, Py_MIN(nbytes, original_nbytes)); in _PyMem_DebugRawRealloc()
2206 memcpy(data, save, Py_MIN(nbytes, ERASED_SIZE)); in _PyMem_DebugRawRealloc()
2207 if (nbytes > i) { in _PyMem_DebugRawRealloc()
2209 Py_MIN(nbytes - i, ERASED_SIZE)); in _PyMem_DebugRawRealloc()
2217 if (nbytes > original_nbytes) { in _PyMem_DebugRawRealloc()
2219 memset(data + original_nbytes, CLEANBYTE, nbytes - original_nbytes); in _PyMem_DebugRawRealloc()
2234 _PyMem_DebugMalloc(void *ctx, size_t nbytes) in _PyMem_DebugMalloc() argument
2237 return _PyMem_DebugRawMalloc(ctx, nbytes); in _PyMem_DebugMalloc()
2257 _PyMem_DebugRealloc(void *ctx, void *ptr, size_t nbytes) in _PyMem_DebugRealloc() argument
2260 return _PyMem_DebugRawRealloc(ctx, ptr, nbytes); in _PyMem_DebugRealloc()
2274 size_t nbytes; in _PyMem_DebugCheckAddress() local
2304 nbytes = read_size_t(q - 2*SST); in _PyMem_DebugCheckAddress()
2305 tail = q + nbytes; in _PyMem_DebugCheckAddress()
2326 size_t nbytes, serial; in _PyObject_DebugDumpAddress() local
2339 nbytes = read_size_t(q - 2*SST); in _PyObject_DebugDumpAddress()
2341 "requested\n", nbytes); in _PyObject_DebugDumpAddress()
2371 tail = q + nbytes; in _PyObject_DebugDumpAddress()
2399 if (nbytes > 0) { in _PyObject_DebugDumpAddress()