Lines Matching refs:block
95 * of various block allocations used within the server.
143 * "helper" type, which consists of a block of some type, and is linkable.
156 #define msgblock_get(block, type) \
157 ((type *)msgblock_internalget(block, sizeof(type)))
182 dns_msgblock_t *block;
187 block = isc_mem_get(mctx, length);
188 if (block == NULL)
191 block->count = count;
192 block->remaining = count;
194 ISC_LINK_INIT(block, link);
196 return (block);
204 msgblock_internalget(dns_msgblock_t *block, unsigned int sizeof_type) {
207 if (block == NULL || block->remaining == 0)
210 block->remaining--;
212 ptr = (((unsigned char *)block)
214 + (sizeof_type * block->remaining));
220 msgblock_reset(dns_msgblock_t *block) {
221 block->remaining = block->count;
225 * Release memory associated with a message block.
228 msgblock_free(isc_mem_t *mctx, dns_msgblock_t *block, unsigned int sizeof_type)
232 length = sizeof(dns_msgblock_t) + (sizeof_type * block->count);
234 isc_mem_put(mctx, block, length);