Lines Matching refs:block
102 * of various block allocations used within the server.
171 * "helper" type, which consists of a block of some type, and is linkable.
184 #define msgblock_get(block, type) \
185 ((type *)msgblock_internalget(block, sizeof(type)))
204 dns_msgblock_t *block;
209 block = isc_mem_get(mctx, length);
210 if (block == NULL)
213 block->count = count;
214 block->remaining = count;
216 ISC_LINK_INIT(block, link);
218 return (block);
226 msgblock_internalget(dns_msgblock_t *block, unsigned int sizeof_type) {
229 if (block == NULL || block->remaining == 0)
232 block->remaining--;
234 ptr = (((unsigned char *)block)
236 + (sizeof_type * block->remaining));
242 msgblock_reset(dns_msgblock_t *block) {
243 block->remaining = block->count;
247 * Release memory associated with a message block.
250 msgblock_free(isc_mem_t *mctx, dns_msgblock_t *block, unsigned int sizeof_type)
254 length = sizeof(dns_msgblock_t) + (sizeof_type * block->count);
256 isc_mem_put(mctx, block, length);