Lines Matching refs:heap

463  *	The "buf" is used as a heap.
481 unsigned char *heap = buf;
482 unsigned char *end_heap = heap + n_buf;
491 dnptrs[0] = heap;
494 BE_OUT16(heap, npb->name_trn_id);
495 heap += 2;
497 BE_OUT16(heap, npb->info);
498 heap += 2;
500 BE_OUT16(heap, npb->qdcount);
501 heap += 2;
503 BE_OUT16(heap, npb->ancount);
504 heap += 2;
506 BE_OUT16(heap, npb->nscount);
507 heap += 2;
509 BE_OUT16(heap, npb->arcount);
510 heap += 2;
513 if ((heap + 34 + 4) > end_heap)
518 (void) strcpy((char *)heap, (char *)comp_name_buf);
519 heap += strlen((char *)comp_name_buf) + 1;
521 BE_OUT16(heap, npb->question[i].question_type);
522 heap += 2;
524 BE_OUT16(heap, npb->question[i].question_class);
525 heap += 2;
545 if ((heap + 34 + 10) > end_heap)
550 (void) strcpy((char *)heap, (char *)comp_name_buf);
551 heap += strlen((char *)comp_name_buf) + 1;
553 BE_OUT16(heap, nrr[i].rr_type);
554 heap += 2;
556 BE_OUT16(heap, nrr[i].rr_class);
557 heap += 2;
559 BE_OUT32(heap, nrr[i].ttl);
560 heap += 4;
562 BE_OUT16(heap, nrr[i].rdlength);
563 heap += 2;
566 if ((heap + tmp) > end_heap)
575 BE_OUT16(heap, tmp);
576 heap += 2;
579 (void) memcpy(heap,
582 heap += 4;
584 bcopy(nrr[i].rdata, heap, tmp);
585 heap += tmp;
590 return (heap - buf);
660 * Name Server Packet Block (npb). The "block" is used as a heap.
669 unsigned char *heap;
704 heap = npb->block_data;
719 npb->question = (struct name_question *)heap;
720 heap += qdcount * sizeof (struct name_question);
723 npb->question[i].name = (struct name_entry *)heap;
724 heap += sizeof (struct name_entry);
729 nrr = (struct resource_record *)heap;
733 npb->answer = (struct resource_record *)heap;
734 heap += ancount * sizeof (struct resource_record);
739 npb->authority = (struct resource_record *)heap;
740 heap += nscount * sizeof (struct resource_record);
745 npb->additional = (struct resource_record *)heap;
746 heap += arcount * sizeof (struct resource_record);
756 nrr[i].name = (struct name_entry *)heap;
757 heap += sizeof (struct name_entry);
838 bcopy(scan, heap, n);
871 nrr[i].rdata = heap;
874 heap += n;