Lines Matching defs:allocated
34 * The number of allocated elements may grow, shrink, or stay the same.
35 * Failure is impossible if newsize <= self.allocated on entry, although
38 * allocated (the C standard doesn't guarantee this, but it's hard to
48 Py_ssize_t allocated = self->allocated;
52 the allocated size, then proceed with the realloc() to shrink the list.
54 if (allocated >= newsize && newsize >= (allocated >> 1)) {
65 * Add padding to make the allocated size multiple of 4.
93 self->allocated = new_allocated;
106 * allocated size up to the nearest even number.
115 self->allocated = size;
195 op->allocated = size;
214 op->allocated = size;
322 assert(self->allocated == -1 || self->allocated == len);
615 a->allocated = 0;
976 if (Py_SIZE(self) < self->allocated) {
988 if (Py_SIZE(self) < self->allocated) {
2294 saved_allocated = self->allocated;
2297 self->allocated = -1; /* any operation will reset it to >= 0 */
2306 /* Leverage stack space we allocated but won't otherwise use */
2499 if (self->allocated != -1 && result != NULL) {
2517 self->allocated = saved_allocated;
2781 assert(Py_SIZE(self) <= self->allocated || self->allocated == -1);
2783 self->allocated == 0 || self->allocated == -1);
2836 res = _PyObject_SIZE(Py_TYPE(self)) + self->allocated * sizeof(void*);