Lines Matching defs:new_size
583 more_frags(isc__mem_t *ctx, size_t new_size) {
609 frags = (int)(total_size / new_size);
610 ctx->stats[new_size].blocks++;
611 ctx->stats[new_size].freefrags += frags;
614 * "new_size".
617 next = curr + new_size;
618 total_size -= new_size;
622 next += new_size;
623 total_size -= new_size;
639 ctx->freelists[new_size] = tmp;
646 size_t new_size = quantize(size);
649 if (new_size >= ctx->max_size) {
667 * If we don't set new_size to size, then the
671 new_size = size;
676 * of memory and then break it up into "new_size"-sized blocks, adding
679 if (ctx->freelists[new_size] == NULL && !more_frags(ctx, new_size))
683 * The free list uses the "rounded-up" size "new_size".
686 ret = ctx->freelists[new_size];
687 ctx->freelists[new_size] = ctx->freelists[new_size]->next;
698 ctx->stats[new_size].freefrags--;
699 ctx->inuse += new_size;
705 memset(ret, 0xbe, new_size); /* Mnemonic for "beef". */
713 check_overrun(void *mem, size_t size, size_t new_size) {
718 while (size < new_size) {
729 size_t new_size = quantize(size);
731 if (new_size >= ctx->max_size) {
748 check_overrun(mem, size, new_size);
750 memset(mem, 0xde, new_size); /* Mnemonic for "dead". */
754 * The free list uses the "rounded-up" size "new_size".
756 ((element *)mem)->next = ctx->freelists[new_size];
757 ctx->freelists[new_size] = (element *)mem;
767 ctx->stats[new_size].freefrags++;
768 ctx->inuse -= new_size;