diff options
Diffstat (limited to 'include/os/freebsd/spl/sys/kmem.h')
-rw-r--r-- | include/os/freebsd/spl/sys/kmem.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/include/os/freebsd/spl/sys/kmem.h b/include/os/freebsd/spl/sys/kmem.h index a81cb1fb5..ae2941b80 100644 --- a/include/os/freebsd/spl/sys/kmem.h +++ b/include/os/freebsd/spl/sys/kmem.h @@ -52,8 +52,10 @@ MALLOC_DECLARE(M_SOLARIS); typedef struct vmem vmem_t; -extern char *kmem_asprintf(const char *, ...); -extern char *kmem_vasprintf(const char *fmt, va_list ap); +extern char *kmem_asprintf(const char *, ...) + __attribute__((format(printf, 1, 2))); +extern char *kmem_vasprintf(const char *fmt, va_list ap) + __attribute__((format(printf, 1, 0))); typedef struct kmem_cache { char kc_name[32]; @@ -70,6 +72,7 @@ typedef struct kmem_cache { extern uint64_t spl_kmem_cache_inuse(kmem_cache_t *cache); extern uint64_t spl_kmem_cache_entry_size(kmem_cache_t *cache); +__attribute__((alloc_size(1))) void *zfs_kmem_alloc(size_t size, int kmflags); void zfs_kmem_free(void *buf, size_t size); uint64_t kmem_size(void); |