Lines Matching +defs:val +defs:size

49  *   \li A fixed-size header of type journal_rawheader_t.
57 * field of zero. The size of the index can vary between
59 * of a file. The size can be zero.
125 encode_uint32(isc_uint32_t val, unsigned char *p) {
126 p[0] = (isc_uint8_t)(val >> 24);
127 p[1] = (isc_uint8_t)(val >> 16);
128 p[2] = (isc_uint8_t)(val >> 8);
129 p[3] = (isc_uint8_t)(val >> 0);
197 * The header is of a fixed size, with some spare room for future
217 /* Pad the header to a fixed size. */
226 unsigned char size[4]; /*%< In bytes, excluding header. */
236 unsigned char size[4]; /*%< In bytes, excluding header. */
262 isc_uint32_t size;
271 isc_uint32_t size;
448 xhdr->size = decode_uint32(raw.size);
455 journal_write_xhdr(dns_journal_t *j, isc_uint32_t size,
459 encode_uint32(size, raw.size);
477 rrhdr->size = decode_uint32(raw.size);
488 int size;
505 size = sizeof(journal_rawheader_t) +
508 mem = isc_mem_get(mctx, size);
514 memset(mem, 0, size);
517 result = isc_stdio_write(mem, 1, (size_t) size, fp, NULL);
524 isc_mem_put(mctx, mem, size);
527 isc_mem_put(mctx, mem, size);
808 if ((isc_offset_t)(pos->offset + sizeof(journal_rawxhdr_t) + xhdr.size)
815 pos->offset += sizeof(journal_rawxhdr_t) + xhdr.size;
992 unsigned int size;
1003 * Pass 1: determine the buffer size needed, and
1006 size = 0;
1016 size += sizeof(journal_rawrrhdr_t);
1017 size += t->name.length; /* XXX should have access macro? */
1018 size += 10;
1019 size += t->rdata.length;
1022 mem = isc_mem_get(j->mctx, size);
1026 isc_buffer_init(&buffer, mem, size);
1053 INSIST(used.length == size);
1066 isc_mem_put(j->mctx, mem, size);
1530 * Make sure the buffer 'b' is has at least 'size' bytes
1539 size_buffer(isc_mem_t *mctx, isc_buffer_t *b, unsigned size) {
1540 if (b->length < size) {
1541 void *mem = isc_mem_get(mctx, size);
1547 b->length = size;
1612 if (xhdr.size == 0) {
1626 j->it.xsize = xhdr.size;
1634 * Perform a sanity check on the journal RR size.
1638 * size owner name, well below 70 k total.
1640 if (rrhdr.size < 1+10 || rrhdr.size > 70000) {
1642 "%s: journal corrupt: impossible RR size "
1643 "(%d bytes)", j->filename, rrhdr.size);
1647 CHECK(size_buffer(j->mctx, &j->it.source, rrhdr.size));
1648 CHECK(journal_read(j, j->it.source.base, rrhdr.size));
1649 isc_buffer_add(&j->it.source, rrhdr.size);
1652 * The target buffer is made the same size
1657 CHECK(size_buffer(j->mctx, &j->it.target, rrhdr.size));
1692 j->it.xpos += sizeof(journal_rawrrhdr_t) + rrhdr.size;
2021 unsigned int size = 0;
2120 * all uncommitted deltas regardless of the size.
2128 size = 64*1024;
2129 if (copy_length < size)
2130 size = copy_length;
2131 buf = isc_mem_get(mctx, size);
2139 for (i = 0; i < copy_length; i += size) {
2140 unsigned int len = (copy_length - i) > size ? size :
2224 isc_mem_put(mctx, buf, size);