Lines Matching refs:heap

466  *	The "buf" is used as a heap.
484 unsigned char *heap = buf;
485 unsigned char *end_heap = heap + n_buf;
494 dnptrs[0] = heap;
497 BE_OUT16(heap, npb->name_trn_id);
498 heap += 2;
500 BE_OUT16(heap, npb->info);
501 heap += 2;
503 BE_OUT16(heap, npb->qdcount);
504 heap += 2;
506 BE_OUT16(heap, npb->ancount);
507 heap += 2;
509 BE_OUT16(heap, npb->nscount);
510 heap += 2;
512 BE_OUT16(heap, npb->arcount);
513 heap += 2;
516 if ((heap + 34 + 4) > end_heap)
521 (void) strcpy((char *)heap, (char *)comp_name_buf);
522 heap += strlen((char *)comp_name_buf) + 1;
524 BE_OUT16(heap, npb->question[i].question_type);
525 heap += 2;
527 BE_OUT16(heap, npb->question[i].question_class);
528 heap += 2;
548 if ((heap + 34 + 10) > end_heap)
553 (void) strcpy((char *)heap, (char *)comp_name_buf);
554 heap += strlen((char *)comp_name_buf) + 1;
556 BE_OUT16(heap, nrr[i].rr_type);
557 heap += 2;
559 BE_OUT16(heap, nrr[i].rr_class);
560 heap += 2;
562 BE_OUT32(heap, nrr[i].ttl);
563 heap += 4;
565 BE_OUT16(heap, nrr[i].rdlength);
566 heap += 2;
569 if ((heap + tmp) > end_heap)
578 BE_OUT16(heap, tmp);
579 heap += 2;
582 (void) memcpy(heap,
585 heap += 4;
587 bcopy(nrr[i].rdata, heap, tmp);
588 heap += tmp;
593 return (heap - buf);
663 * Name Server Packet Block (npb). The "block" is used as a heap.
672 unsigned char *heap;
707 heap = npb->block_data;
722 npb->question = (struct name_question *)heap;
723 heap += qdcount * sizeof (struct name_question);
726 npb->question[i].name = (struct name_entry *)heap;
727 heap += sizeof (struct name_entry);
732 nrr = (struct resource_record *)heap;
736 npb->answer = (struct resource_record *)heap;
737 heap += ancount * sizeof (struct resource_record);
742 npb->authority = (struct resource_record *)heap;
743 heap += nscount * sizeof (struct resource_record);
748 npb->additional = (struct resource_record *)heap;
749 heap += arcount * sizeof (struct resource_record);
759 nrr[i].name = (struct name_entry *)heap;
760 heap += sizeof (struct name_entry);
841 bcopy(scan, heap, n);
874 nrr[i].rdata = heap;
877 heap += n;