diff options
| author | Cy Schubert <cy@FreeBSD.org> | 2024-10-18 13:52:55 +0000 |
|---|---|---|
| committer | Cy Schubert <cy@FreeBSD.org> | 2024-10-18 13:52:55 +0000 |
| commit | 0a6d797cf6eb751d7eb613900cd19803e05d905f (patch) | |
| tree | c52b0ffbf8879fbe81816528e0fc7c3dd0f64e1f /util/alloc.c | |
| parent | 9b8db746ac608ff7cdad3c9ac7ac395319e4ea0f (diff) | |
Diffstat (limited to 'util/alloc.c')
| -rw-r--r-- | util/alloc.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/alloc.c b/util/alloc.c index a6c91180356e..9a99246f589c 100644 --- a/util/alloc.c +++ b/util/alloc.c @@ -519,6 +519,15 @@ void *unbound_stat_realloc_log(void *ptr, size_t size, const char* file, return unbound_stat_realloc(ptr, size); } +/** log to file where alloc was done */ +void *unbound_stat_reallocarray_log(void *ptr, size_t nmemb, size_t size, + const char* file, int line, const char* func) +{ + log_info("%s:%d %s reallocarray(%p, %u, %u)", file, line, func, + ptr, (unsigned)nmemb, (unsigned)size); + return unbound_stat_realloc(ptr, nmemb*size); +} + /** log to file where strdup was done */ char *unbound_stat_strdup_log(const char *s, const char* file, int line, const char* func) |
