Lines Matching defs:new_size
421 more_frags(isc_mem_t *ctx, size_t new_size) {
447 frags = total_size / new_size;
448 ctx->stats[new_size].blocks++;
449 ctx->stats[new_size].freefrags += frags;
452 * "new_size".
455 next = curr + new_size;
456 total_size -= new_size;
460 next += new_size;
461 total_size -= new_size;
477 ctx->freelists[new_size] = new;
484 size_t new_size = quantize(size);
487 if (size >= ctx->max_size || new_size >= ctx->max_size) {
505 * If we don't set new_size to size, then the
509 new_size = size;
515 * of memory and then break it up into "new_size"-sized blocks, adding
518 if (ctx->freelists[new_size] == NULL && !more_frags(ctx, new_size))
522 * The free list uses the "rounded-up" size "new_size".
524 ret = ctx->freelists[new_size];
525 ctx->freelists[new_size] = ctx->freelists[new_size]->next;
535 ctx->stats[new_size].freefrags--;
536 ctx->inuse += new_size;
542 memset(ret, 0xbe, new_size); /* Mnemonic for "beef". */
550 check_overrun(void *mem, size_t size, size_t new_size) {
555 while (size < new_size) {
565 size_t new_size = quantize(size);
567 if (size == ctx->max_size || new_size >= ctx->max_size) {
585 check_overrun(mem, size, new_size);
587 memset(mem, 0xde, new_size); /* Mnemonic for "dead". */
591 * The free list uses the "rounded-up" size "new_size".
593 ((element *)mem)->next = ctx->freelists[new_size];
594 ctx->freelists[new_size] = (element *)mem;
604 ctx->stats[new_size].freefrags++;
605 ctx->inuse -= new_size;