Lines Matching defs:allocated
78 allocated for string data, not counting the null terminating character.
2711 size = writer.allocated;
2731 size = writer.allocated;
2793 size = writer.allocated;
2826 size = writer.allocated;
3048 As always, an extra byte is allocated for a trailing \0 byte (newsize
3336 assert(str - start <= writer->allocated);
3364 assert(0 <= writer->allocated);
3365 assert(0 <= writer->min_size && writer->min_size <= writer->allocated);
3368 assert(start[writer->allocated] == 0);
3370 end = start + writer->allocated;
3380 Py_ssize_t allocated, pos;
3383 assert(writer->allocated < size);
3385 allocated = size;
3387 && allocated <= (PY_SSIZE_T_MAX - allocated / OVERALLOCATE_FACTOR)) {
3389 allocated += allocated / OVERALLOCATE_FACTOR;
3395 if (PyByteArray_Resize(writer->buffer, allocated))
3397 /* writer->allocated can be smaller than writer->buffer->ob_alloc,
3404 if (_PyBytes_Resize(&writer->buffer, allocated))
3413 writer->buffer = PyByteArray_FromStringAndSize(NULL, allocated);
3415 writer->buffer = PyBytes_FromStringAndSize(NULL, allocated);
3436 writer->allocated = allocated;
3467 if (new_min_size > writer->allocated)
3486 writer->allocated = sizeof(writer->small_buffer) - 1;
3497 writer->allocated = Py_MIN(writer->allocated, 10);
3500 writer->small_buffer[writer->allocated] = 0;
3502 writer->allocated = sizeof(writer->small_buffer);
3533 if (size != writer->allocated) {