Lines Matching +full:slot +full:- +full:size

49 	size_t		 size;  member
85 if (ret == -1) in mandoc_dbg_asprintf()
95 mandoc_dbg_calloc(size_t num, size_t size, const char *file, int line) in mandoc_dbg_calloc() argument
97 void *ptr = mandoc_calloc(num, size); in mandoc_dbg_calloc()
98 dhash_register(file, line, "calloc", num, size, ptr, NULL); in mandoc_dbg_calloc()
103 mandoc_dbg_malloc(size_t size, const char *file, int line) in mandoc_dbg_malloc() argument
105 void *ptr = mandoc_malloc(size); in mandoc_dbg_malloc()
106 dhash_register(file, line, "malloc", 1, size, ptr, NULL); in mandoc_dbg_malloc()
111 mandoc_dbg_realloc(void *ptr, size_t size, const char *file, int line) in mandoc_dbg_realloc() argument
114 ptr = mandoc_realloc(ptr, size); in mandoc_dbg_realloc()
115 dhash_register(file, line, "realloc", 1, size, ptr, NULL); in mandoc_dbg_realloc()
120 mandoc_dbg_reallocarray(void *ptr, size_t num, size_t size, in mandoc_dbg_reallocarray() argument
124 ptr = mandoc_reallocarray(ptr, num, size); in mandoc_dbg_reallocarray()
125 dhash_register(file, line, "reallocarray", num, size, ptr, NULL); in mandoc_dbg_reallocarray()
130 mandoc_dbg_recallocarray(void *ptr, size_t oldnum, size_t num, size_t size, in mandoc_dbg_recallocarray() argument
134 ptr = mandoc_recallocarray(ptr, oldnum, num, size); in mandoc_dbg_recallocarray()
135 dhash_register(file, line, "recallocarray", num, size, ptr, NULL); in mandoc_dbg_recallocarray()
249 /* Hash a pointer and return the table slot currently used for it. */
265 size_t num, size_t size, void *ptr, const char *str) in dhash_register() argument
268 unsigned int slot; in dhash_register() local
270 slot = dhash_slot(ptr); in dhash_register()
271 e = ohash_find(&dhash_table, slot); in dhash_register()
274 file, line, func, num, size, ptr); in dhash_register()
281 fprintf(dhash_fp, "E duplicate address %p\n", e->ptr); in dhash_register()
282 errx((int)MANDOCLEVEL_BADARG, "duplicate address %p", e->ptr); in dhash_register()
287 e->file = file; in dhash_register()
288 e->line = line; in dhash_register()
289 e->func = func; in dhash_register()
290 e->num = num; in dhash_register()
291 e->size = size; in dhash_register()
292 e->ptr = ptr; in dhash_register()
294 ohash_insert(&dhash_table, slot, e); in dhash_register()
302 unsigned int slot; in dhash_purge() local
310 slot = dhash_slot(ptr); in dhash_purge()
311 e = ohash_remove(&dhash_table, slot); in dhash_purge()
315 /* Pretty-print information about one allocation. */
320 e->file, e->line, e->func, e->num, e->size, e->ptr); in dhash_print()
323 /* Pretty-print information about all active allocations. */
328 unsigned int errcount, slot; in mandoc_dbg_finish() local
331 e = ohash_first(&dhash_table, &slot); in mandoc_dbg_finish()
336 e = ohash_next(&dhash_table, &slot); in mandoc_dbg_finish()